some additional tests for better coverage
[gitmo/Moose.git] / t / 030_roles / 016_runtime_roles_and_nonmoose.t
index 706018d..056aef7 100644 (file)
@@ -3,7 +3,7 @@
 use strict;
 use warnings;
 
-use Test::More tests => 7;
+use Test::More tests => 8;
 use Test::Exception;
 use Scalar::Util 'blessed';
 
@@ -35,24 +35,25 @@ BEGIN {
     }
 }
 
-my $obj = Bar->new;
-isa_ok($obj, 'Bar');    
+my $bar = Bar->new;
+isa_ok($bar, 'Bar');    
 
 my $foo = Foo->new;
+isa_ok($foo, 'Foo');  
 
-ok(!$obj->can( 'talk' ), "... the role is not composed yet");
+ok(!$bar->can( 'talk' ), "... the role is not composed yet");
 
 dies_ok {
-    $foo->dog($obj)
+    $foo->dog($bar)
 } '... and setting the accessor fails (not a Dog yet)';
 
-Dog->meta->apply($obj);
+Dog->meta->apply($bar);
 
-ok($obj->can('talk'), "... the role is now composed at the object level");
+ok($bar->can('talk'), "... the role is now composed at the object level");
 
-is($obj->talk, 'woof', '... got the right return value for the newly composed method');
+is($bar->talk, 'woof', '... got the right return value for the newly composed method');
 
 lives_ok {
-    $foo->dog($obj)
+    $foo->dog($bar)
 } '... and setting the accessor is okay';