Call config as a method rather than poking the hash directly. Less gross
[catagits/Catalyst-Devel.git] / share / t / comptest.tt
CommitLineData
239b5fc0 1use strict;
2use warnings;
3[% IF long_type == 'Controller' %][% IF mech %]use Test::More;
4
6fce1f9f 5eval "use Test::WWW::Mechanize::Catalyst '[% name %]'";
239b5fc0 6plan $@
7 ? ( skip_all => 'Test::WWW::Mechanize::Catalyst required' )
8 : ( tests => 2 );
9
10ok( my $mech = Test::WWW::Mechanize::Catalyst->new, 'Created mech object' );
11
12$mech->get_ok( 'http://localhost[% uri %]' );
13[% ELSE %]use Test::More tests => 3;
14
6fce1f9f 15BEGIN { use_ok 'Catalyst::Test', '[% name %]' }
239b5fc0 16BEGIN { use_ok '[% class %]' }
17
18ok( request('[% uri %]')->is_success, 'Request should succeed' );
19[% END %]
20[% ELSE %]use Test::More tests => 1;
21
22BEGIN { use_ok '[% class %]' }
23[% END %]