-use Test::More tests => 2;
+use Test::More tests => 1;
use strict;
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;
}
-{
- 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');
+