From: Tomas Doran Date: Wed, 7 Jan 2009 23:25:37 +0000 (+0000) Subject: Fix test, we're now outputting multiple lines, and I shot the re-dispatch, as the... X-Git-Tag: 5.8000_05~38 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=commitdiff_plain;h=351549839ffa3e5df968cfea9f09b1d16efd3aad Fix test, we're now outputting multiple lines, and I shot the re-dispatch, as the only real thing it broke was Reaction --- 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'); +