Fix the return value of Catalyst::Request's body method + tests.
[catagits/Catalyst-Runtime.git] / t / meta_method_unneeded.t
CommitLineData
74c89dea 1use strict;
2use warnings;
3use Test::More tests => 1;
4use Test::Exception;
5use Carp ();
6$SIG{__DIE__} = \&Carp::confess; # Stacktrace please.
7
8# Doing various silly things, like for example
9# use CGI qw/:stanard/ in your conrtoller / app
10# will overwrite your meta method, therefore Catalyst
11# can't depend on it being there correctly.
12
13# This is/was demonstrated by Catalyst::Controller::WrapCGI
14# and Catalyst::Plugin::Cache::Curried
15
16{
17 package TestAppWithMeta;
18 use Catalyst;
02570318 19 no warnings 'redefine';
74c89dea 20 sub meta {}
21}
22
23lives_ok { TestAppWithMeta->setup } 'Can setup an app which defines its own meta method';