From 71a7e65676fb2ff62ce8c11429981621cb864a95 Mon Sep 17 00:00:00 2001 From: doy Date: Mon, 20 Apr 2009 21:03:00 -0500 Subject: quiet warnings during make_immutable, since they're expected in this test --- t/022-replaced-constructor.t | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 't') diff --git a/t/022-replaced-constructor.t b/t/022-replaced-constructor.t index b16890a..fc4b5bb 100644 --- a/t/022-replaced-constructor.t +++ b/t/022-replaced-constructor.t @@ -38,7 +38,12 @@ isa_ok($method, 'Class::MOP::Method::Wrapped'); my $foo = Foo::Moose->new; ok($foo_constructed, 'method modifier called for the constructor'); $foo_constructed = 0; -Foo::Moose->meta->make_immutable; +{ + # we don't care about the warning that moose isn't going to inline our + # constructor - this is the behavior we're testing + local $SIG{__WARN__} = sub {}; + Foo::Moose->meta->make_immutable; +} is($method, Foo::Moose->meta->get_method('new'), 'make_immutable doesn\'t overwrite constructor with method modifiers'); $foo = Foo::Moose->new; -- cgit v1.2.3