Add test controller with its own meta method, still works
[catagits/Catalyst-Runtime.git] / t / meta_method_unneeded.t
index f083fce..6820f3f 100644 (file)
@@ -1,12 +1,13 @@
 use strict;
 use warnings;
-use Test::More tests => 1;
+use FindBin qw/$Bin/;
+use lib "$Bin/lib";
+use Test::More tests => 2;
 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.
 
@@ -19,5 +20,11 @@ $SIG{__DIE__} = \&Carp::confess; # Stacktrace please.
     no warnings 'redefine';
     sub meta {}
 }
+BEGIN {
+    lives_ok { TestAppWithMeta->setup } 'Can setup an app which defines its own meta method';
+}
+
+use Catalyst::Test 'TestAppWithMeta';
+
+ok( request('/')->is_success );
 
-lives_ok { TestAppWithMeta->setup } 'Can setup an app which defines its own meta method';