X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F300_immutable%2F009_buildargs.t;h=5f9a10adecd0fb62b2271749f668088246b64a78;hb=9dcd7d2378107301c0f815a407b3b4e55c2909f8;hp=6c1ca33d69825182e6a3defb29b3d0677feed3de;hpb=fc1d8369f17d2d6a06ecdcb13199e1d4ecb2e53f;p=gitmo%2FMouse.git diff --git a/t/300_immutable/009_buildargs.t b/t/300_immutable/009_buildargs.t index 6c1ca33..5f9a10a 100644 --- a/t/300_immutable/009_buildargs.t +++ b/t/300_immutable/009_buildargs.t @@ -7,7 +7,7 @@ use Test::More tests => 14; { package Foo; - use Moose; + use Mouse; has bar => ( is => "rw" ); has baz => ( is => "rw" ); @@ -21,7 +21,7 @@ use Test::More tests => 14; __PACKAGE__->meta->make_immutable; package Bar; - use Moose; + use Mouse; extends qw(Foo); @@ -32,16 +32,12 @@ foreach my $class qw(Foo Bar) { is( $class->new->bar, undef, "no args" ); is( $class->new( bar => 42 )->bar, 42, "normal args" ); is( $class->new( 37 )->bar, 37, "single arg" ); - { - my $o = $class->new(bar => 42, baz => 47); - is($o->bar, 42, '... got the right bar'); - is($o->baz, 47, '... got the right bar'); - } - { - my $o = $class->new(42, baz => 47); - is($o->bar, 42, '... got the right bar'); - is($o->baz, 47, '... got the right bar'); - } + my $o = $class->new(bar => 42, baz => 47); + is($o->bar, 42, '... got the right bar'); + is($o->baz, 47, '... got the right bar'); + my $ob = $class->new(42, baz => 47); + is($ob->bar, 42, '... got the right bar'); + is($ob->baz, 47, '... got the right bar'); }