X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=share%2Ft%2Fcomptest.tt;h=d46300b340ced881645d7ddf122106583473cb21;hb=65108673c7445a2066d1f6caa6dcc4dabf915632;hp=acfcd9711051fd6b80efb4f57739d7872b0889c8;hpb=6fce1f9f58ceb9632313d150f098dc50ad465c71;p=catagits%2FCatalyst-Devel.git diff --git a/share/t/comptest.tt b/share/t/comptest.tt index acfcd97..d46300b 100644 --- a/share/t/comptest.tt +++ b/share/t/comptest.tt @@ -3,21 +3,25 @@ use warnings; [% IF long_type == 'Controller' %][% IF mech %]use Test::More; eval "use Test::WWW::Mechanize::Catalyst '[% name %]'"; -plan $@ - ? ( skip_all => 'Test::WWW::Mechanize::Catalyst required' ) - : ( tests => 2 ); +if ($@) { + plan skip_all => 'Test::WWW::Mechanize::Catalyst required'; + exit 0; +} ok( my $mech = Test::WWW::Mechanize::Catalyst->new, 'Created mech object' ); $mech->get_ok( 'http://localhost[% uri %]' ); -[% ELSE %]use Test::More tests => 3; +[%- ELSE %]use Test::More; -BEGIN { use_ok 'Catalyst::Test', '[% name %]' } +BEGIN { use_ok 'Catalyst::Test', '[% app %]' } BEGIN { use_ok '[% class %]' } ok( request('[% uri %]')->is_success, 'Request should succeed' ); -[% END %] -[% ELSE %]use Test::More tests => 1; +[%- END -%] +[% ELSE %]use Test::More; BEGIN { use_ok '[% class %]' } -[% END %] +[% END -%] + +done_testing(); +1;