X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F300_immutable%2F011_constructor_is_wrapped.t;h=6759134752b0da107cc395d0f9720ca35e6a06f8;hb=a28e50e44945358d15eb19e4688573741a319fe0;hp=f7f71b2887550921479752ed1cec4e8c0d9e9819;hpb=0fa70d03f16f7932e345e35caa8f0fca009242e4;p=gitmo%2FMoose.git diff --git a/t/300_immutable/011_constructor_is_wrapped.t b/t/300_immutable/011_constructor_is_wrapped.t index f7f71b2..6759134 100644 --- a/t/300_immutable/011_constructor_is_wrapped.t +++ b/t/300_immutable/011_constructor_is_wrapped.t @@ -4,11 +4,10 @@ use strict; use warnings; use Test::More; - -eval "use Test::Output"; -plan skip_all => "Test::Output is required for this test" if $@; - -plan tests => 1; +BEGIN { + eval "use Test::Output;"; + plan skip_all => "Test::Output is required for this test" if $@; +} { package ModdedNew; @@ -23,9 +22,11 @@ plan tests => 1; extends 'ModdedNew'; - ::stderr_is( + ::stderr_like( sub { Foo->meta->make_immutable }, - "Not inlining 'new' for Foo since it is not inheriting the default Moose::Object::new\nIf you are certain you don't need to inline your constructor, specify inline_constructor => 0 in your call to Foo->meta->make_immutable\n ('new' has method modifiers which would be lost if it were inlined)\n", + qr/\QNot inlining 'new' for Foo since it has method modifiers which would be lost if it were inlined/, 'got a warning that Foo may not have an inlined constructor' ); } + +done_testing;