1 use Test::More tests => 6;
\r
3 my $app = MockApp->new;
\r
7 is( $app->config->{ 'Controller::Foo' }->{ foo }, 'bar' );
\r
8 is( $app->config->{ 'Controller::Foo' }->{ new }, 'key' );
\r
9 is( $app->config->{ 'Model::Baz' }->{ qux }, 'xyzzy' );
\r
10 is( $app->config->{ 'Model::Baz' }->{ another }, 'new key' );
\r
11 is( $app->config->{ 'view' }, 'View::TT::New' );
\r
15 use base qw( Catalyst::Plugin::ConfigLoader );
\r
17 use Catalyst::Utils;
\r
20 return bless { }, shift;
\r
33 $self->{ _config } = {} unless $self->{ _config };
\r
35 my $config = @_ > 1 ? {@_} : $_[0];
\r
36 while ( my ( $key, $val ) = each %$config ) {
\r
37 $self->{ _config }->{$key} = $val;
\r
40 return $self->{ _config };
\r