Add test controller with its own meta method, still works
[catagits/Catalyst-Runtime.git] / t / meta_method_unneeded.t
CommitLineData
74c89dea 1use strict;
2use warnings;
2664a81b 3use FindBin qw/$Bin/;
4use lib "$Bin/lib";
5use Test::More tests => 2;
74c89dea 6use Test::Exception;
7use Carp ();
74c89dea 8
9# Doing various silly things, like for example
2664a81b 10# use CGI qw/:standard/ in your conrtoller / app
74c89dea 11# will overwrite your meta method, therefore Catalyst
12# can't depend on it being there correctly.
13
14# This is/was demonstrated by Catalyst::Controller::WrapCGI
15# and Catalyst::Plugin::Cache::Curried
16
17{
18 package TestAppWithMeta;
19 use Catalyst;
02570318 20 no warnings 'redefine';
74c89dea 21 sub meta {}
22}
2664a81b 23BEGIN {
24 lives_ok { TestAppWithMeta->setup } 'Can setup an app which defines its own meta method';
25}
26
27use Catalyst::Test 'TestAppWithMeta';
28
29ok( request('/')->is_success );
74c89dea 30