6 my $config_1 = sub { +{
8 bee => [qw( bal /bas bo )],
10 zoom => ['/zow','zee'],
16 'REL!!' => '/foo/shouldberel',
17 '!!ABS' => '/bar/shouldbeabs',
19 'Plugin::TestMode' => {
22 '/big/long/thing/that/does/not/exist',
29 test_data_dir => '/path/to/app/t/data',
34 'Plugin::TestMode' => {
37 '/big/long/thing/that/does/not/exist',
44 'test_data_dir' => '/path/to/app/t/data'
47 'REL!!' => '/../../app/t/data/foo/shouldberel',
48 '!!ABS' => '/path/to/app/t/data/bar/shouldbeabs',
58 'noggin' => '/fogbat',
60 '/path/to/app/t/data/zow',
61 '../../app/t/data/zee'
63 bunk => '../../app/t/data/bonk',
64 snorg => '/path/to/app/t/data/tees',
70 local $ENV{MOCK_APP_TEST_MODE} = 1;
71 my $c = mock_app->new( config => $config_1->() );
74 is_deeply( $c->config, $rerooted_1, 'test-mode configuration worked' )
75 or diag 'actual config:', explain $c->config;
80 local $ENV{MOCK_APP_TEST_MODE} = undef;
81 my $c = mock_app->new;
82 $c->config( $config_1->() );
85 is_deeply( $c->config, $config_1->(), 'non-test configuration worked' )
86 or diag 'actual config:', explain $c->config;
103 with 'SGN::Role::Site::TestMode';
105 sub finalize_config {};
109 return File::Spec->catfile(
111 qw( path to mock app ),