X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Fdeprecated.t;fp=t%2Fdeprecated.t;h=0000000000000000000000000000000000000000;hb=f436bc1bece2bcc2a04138068e5c22e70d9d6d35;hp=d9f90e0c5eeaa4cc694e739123f7260aa755466a;hpb=e28a6876ad3e11890226e5bab6df4b0725e0981e;p=catagits%2FCatalyst-Runtime.git diff --git a/t/deprecated.t b/t/deprecated.t deleted file mode 100644 index d9f90e0..0000000 --- a/t/deprecated.t +++ /dev/null @@ -1,45 +0,0 @@ -#!/usr/bin/perl - -use strict; -use warnings; -use FindBin qw/$Bin/; -use lib "$Bin/lib"; -use Test::More tests => 4; - -my $warnings; -BEGIN { # Do this at compile time in case we generate a warning when use - # DeprecatedTestApp - $SIG{__WARN__} = sub { - $warnings++ if $_[0] =~ /uses NEXT, which is deprecated/; - $warnings++ if $_[0] =~ /trying to use NEXT, which is deprecated/; - }; -} -use Catalyst; # Cause catalyst to be used so I can fiddle with the logging. -my $mvc_warnings; -BEGIN { - my $logger = Class::MOP::Class->create_anon_class( - methods => { - debug => sub {0}, - info => sub {0}, - warn => sub { - if ($_[1] =~ /switch your class names/) { - $mvc_warnings++; - return; - } - die "Caught unexpected warning: " . $_[1]; - }, - }, -)->new_object; - Catalyst->log($logger); -} - -use Catalyst::Test 'DeprecatedTestApp'; -is( $mvc_warnings, 1, 'Get the ::MVC:: warning' ); - -ok( my $response = request('http://localhost/'), 'Request' ); -is( $response->header('X-Catalyst-Plugin-Deprecated'), '1', 'NEXT plugin ran correctly' ); - -SKIP: { - skip 'non-dev release', 1 unless Catalyst::_IS_DEVELOPMENT_VERSION(); - is( $warnings, 1, 'Got one and only one Adopt::NEXT warning'); -}