X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F032-buildargs.t;h=4b286f3ef1b6cca8d976172a2bcb4d7d5654435e;hb=8a3e5c5d45741e488e89d5130b5dcb44f2c6a6f4;hp=209adc0ff98100f5206414740e71b9a824582b8a;hpb=d574882a10a05f5e8c515a87358460f7ae0ed247;p=gitmo%2FMouse.git diff --git a/t/032-buildargs.t b/t/032-buildargs.t index 209adc0..4b286f3 100644 --- a/t/032-buildargs.t +++ b/t/032-buildargs.t @@ -3,9 +3,7 @@ use strict; use warnings; use Test::More tests => 3; -use lib 't/lib'; - -{ +do { package Foo; use Mouse; @@ -15,9 +13,9 @@ use lib 't/lib'; my ( $self, @args ) = @_; return { @args % 2 ? ( foo => @args ) : @args }; } -} +}; -is( Foo->new->foo, undef, "no value" ); -is( Foo->new("bar")->foo, "bar", "single arg" ); -is( Foo->new(foo => "bar")->foo, "bar", "twoargs" ); +is(Foo->new->foo, undef, "no value"); +is(Foo->new("bar")->foo, "bar", "single arg"); +is(Foo->new(foo => "bar")->foo, "bar", "twoargs");