use inlined module hiding in tests
[catagits/Catalyst-Runtime.git] / t / aggregate / unit_core_component_layers.t
1 use Test::More tests => 6;
2 use strict;
3 use warnings;
4 use lib 't/lib';
5
6 # This tests that we actually load the physical
7 #  copy of Model::Foo::Bar, in the case that Model::Foo
8 #  defines the Model::Foo::Bar namespace in memory,
9 #  but does not load the corresponding file.
10
11 use_ok 'TestApp';
12
13 my $model_foo     = TestApp->model('Foo');
14
15 can_ok($model_foo, 'model_foo_method');
16 can_ok($model_foo, 'bar');
17
18 my $model_foo_bar = $model_foo->bar;
19
20 can_ok($model_foo_bar, 'model_foo_bar_method_from_foo');
21 can_ok($model_foo_bar, 'model_foo_bar_method_from_foo_bar');
22
23 # I commented out this line since we seem to just massively
24 # fail on the 'you already did setup.  I have no idea why its
25 # here - jnap
26 #TestApp->setup;
27
28 is($model_foo->model_quux_method, 'chunkybacon', 'Model method getting $self->{quux} from config');
29