f20183f53cb5a0ec56d4f2bfe2c3ae057c2b54b7
[catagits/Catalyst-Plugin-ConfigLoader.git] / t / 20-mock_load.t
1 package MockApp;
2
3 use Test::More tests => 7;
4
5 use Cwd;
6 $ENV{ CATALYST_HOME } = cwd . '/t/mockapp';
7
8 use_ok( 'Catalyst', qw( ConfigLoader ) );
9
10 __PACKAGE__->setup;
11
12 use Data::Dumper; print Dumper __PACKAGE__->config;
13
14 ok( __PACKAGE__->config );
15 is( __PACKAGE__->config->{ 'Controller::Foo' }->{ foo }, 'bar' );
16 is( __PACKAGE__->config->{ 'Controller::Foo' }->{ new }, 'key' );
17 is( __PACKAGE__->config->{ 'Model::Baz' }->{ qux }, 'xyzzy' );
18 is( __PACKAGE__->config->{ 'Model::Baz' }->{ another }, 'new key' );
19 is( __PACKAGE__->config->{ 'view' }, 'View::TT::New' );