X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Funit_core_component_mro.t;h=a8699c30e22ffcdb961c6e95294c6438c326667c;hb=f27f2c6dee65b9f6f18f2ff90ab337e97a585fed;hp=45d09250f69fed5bc891f8be1652fa33b9f7787b;hpb=c48335a32ac4189b8613b1dbb8837d7a7cc4dc40;p=catagits%2FCatalyst-Runtime.git diff --git a/t/unit_core_component_mro.t b/t/unit_core_component_mro.t index 45d0925..a8699c3 100644 --- a/t/unit_core_component_mro.t +++ b/t/unit_core_component_mro.t @@ -1,4 +1,4 @@ -use Test::More tests => 2; +use Test::More tests => 1; use strict; use warnings; @@ -7,8 +7,7 @@ use warnings; use Test::More; sub COMPONENT { - my $caller = caller; - is($caller, 'Catalyst::Component', 'Correct method resolution'); + fail 'This no longer gets dispatched to'; } package MyApp::MyComponent; @@ -17,10 +16,14 @@ use warnings; } -{ - my $expects = qr/after Catalyst::Component in MyApp::Component/; +my $warn = ''; +{ local $SIG{__WARN__} = sub { - like($_[0], $expects, 'correct warning thrown'); + $warn .= $_[0]; }; MyApp::MyComponent->COMPONENT('MyApp'); } + +like($warn, qr/after Catalyst::Component in MyApp::Component/, + 'correct warning thrown'); +