X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Fmeta_method_unneeded.t;h=aa434727857ada3c82add216a863fa7da13dbe3d;hb=79f5d5718d885ee1c3f288159a31562f9cf5b02f;hp=f083fcef81ee1b21c180fc4ef2a998828e7ac898;hpb=ae29b412955743885e80350085167b54b69672da;p=catagits%2FCatalyst-Runtime.git diff --git a/t/meta_method_unneeded.t b/t/meta_method_unneeded.t index f083fce..aa43472 100644 --- a/t/meta_method_unneeded.t +++ b/t/meta_method_unneeded.t @@ -1,23 +1,20 @@ use strict; use warnings; +use FindBin qw/$Bin/; +use lib "$Bin/lib"; use Test::More tests => 1; use Test::Exception; use Carp (); -$SIG{__DIE__} = \&Carp::confess; # Stacktrace please. # Doing various silly things, like for example -# use CGI qw/:stanard/ in your conrtoller / app +# use CGI qw/:standard/ in your conrtoller / app # will overwrite your meta method, therefore Catalyst # can't depend on it being there correctly. # This is/was demonstrated by Catalyst::Controller::WrapCGI # and Catalyst::Plugin::Cache::Curried -{ - package TestAppWithMeta; - use Catalyst; - no warnings 'redefine'; - sub meta {} -} +use Catalyst::Test 'TestAppWithMeta'; + +ok( request('/')->is_success ); -lives_ok { TestAppWithMeta->setup } 'Can setup an app which defines its own meta method';