Fix test to actually test what it should be testing
Dave Rolsky [Thu, 9 Apr 2009 00:36:19 +0000 (19:36 -0500)]
t/300_immutable/010_constructor_is_not_moose.t

index 8b47463..1288555 100644 (file)
@@ -46,16 +46,16 @@ is(
     extends 'NotMoose';
 
     ::stderr_is(
-        sub { Foo->meta->make_immutable( replace_constructor => 1 ) },
+        sub { Bar->meta->make_immutable( replace_constructor => 1 ) },
         q{},
         'no warning when replace_constructor is true'
     );
 }
 
-isnt(
-    Bar->meta->find_method_by_name('new')->body,
-    Moose::Object->can('new'),
-    'Bar->new is not inherited from NotMoose because it was inlined'
+is(
+    Bar->meta->find_method_by_name('new')->package_name,
+   'Bar',
+    'Bar->new is inlined, and not inherited from NotMoose'
 );
 
 {