Revert autogenerated tests. Tests should not changed radically.
[gitmo/Mouse.git] / t / 300_immutable / 009_buildargs.t
index b1e433b..5f9a10a 100644 (file)
@@ -1,19 +1,16 @@
 #!/usr/bin/perl
-# This is automatically generated by author/import-moose-test.pl.
-# DO NOT EDIT THIS FILE. ANY CHANGES WILL BE LOST!!!
-use t::lib::MooseCompat;
 
 use strict;
 use warnings;
 
-use Test::More;
+use Test::More tests => 14;
 
 {
     package Foo;
     use Mouse;
 
     has bar => ( is => "rw" );
-    has baz => ( is => "rw" );
+    has baz => ( is => "rw" );    
 
     sub BUILDARGS {
         my ( $self, @args ) = @_;
@@ -27,7 +24,7 @@ use Test::More;
     use Mouse;
 
     extends qw(Foo);
-
+    
     __PACKAGE__->meta->make_immutable;
 }
 
@@ -35,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');
 }
 
-done_testing;
+