File: unit_core_component_layers.t

package info (click to toggle)
libcatalyst-perl 5.90132-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 3,016 kB
  • sloc: perl: 11,061; makefile: 7
file content (29 lines) | stat: -rw-r--r-- 816 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
use Test::More tests => 6;
use strict;
use warnings;
use lib 't/lib';

# This tests that we actually load the physical
#  copy of Model::Foo::Bar, in the case that Model::Foo
#  defines the Model::Foo::Bar namespace in memory,
#  but does not load the corresponding file.

use_ok 'TestApp';

my $model_foo     = TestApp->model('Foo');

can_ok($model_foo, 'model_foo_method');
can_ok($model_foo, 'bar');

my $model_foo_bar = $model_foo->bar;

can_ok($model_foo_bar, 'model_foo_bar_method_from_foo');
can_ok($model_foo_bar, 'model_foo_bar_method_from_foo_bar');

# I commented out this line since we seem to just massively
# fail on the 'you already did setup.  I have no idea why its
# here - jnap
#TestApp->setup;

is($model_foo->model_quux_method, 'chunkybacon', 'Model method getting $self->{quux} from config');