fixed all the attribute name to be more Perl6ish and then removed the : in the init_a...
[gitmo/Class-MOP.git] / t / 102_InsideOutClass_test.t
index 4788dfc..615203d 100644 (file)
@@ -3,8 +3,9 @@
 use strict;
 use warnings;
 
-use Test::More tests => 85;
+use Test::More tests => 89;
 use File::Spec;
+use Scalar::Util 'reftype';
 
 BEGIN { 
     use_ok('Class::MOP');    
@@ -18,8 +19,8 @@ BEGIN {
     use warnings;    
     
     use metaclass (
-        ':attribute_metaclass' => 'InsideOutClass::Attribute',
-        ':instance_metaclass'  => 'InsideOutClass::Instance'
+        'attribute_metaclass' => 'InsideOutClass::Attribute',
+        'instance_metaclass'  => 'InsideOutClass::Instance'
     );
     
     Foo->meta->add_attribute('foo' => (
@@ -55,8 +56,8 @@ BEGIN {
     use strict;
     use warnings;
     use metaclass (     
-        ':attribute_metaclass' => 'InsideOutClass::Attribute',
-        ':instance_metaclass'  => 'InsideOutClass::Instance'
+        'attribute_metaclass' => 'InsideOutClass::Attribute',
+        'instance_metaclass'  => 'InsideOutClass::Instance'
     );
     
     Baz->meta->add_attribute('bling' => (
@@ -75,6 +76,8 @@ BEGIN {
 my $foo = Foo->new();
 isa_ok($foo, 'Foo');
 
+is(reftype($foo), 'SCALAR', '... Foo is made with SCALAR');
+
 can_ok($foo, 'foo');
 can_ok($foo, 'has_foo');
 can_ok($foo, 'get_bar');
@@ -95,6 +98,8 @@ is($foo->get_bar(), 42, '... Foo::bar == 42');
 my $foo2 = Foo->new();
 isa_ok($foo2, 'Foo');
 
+is(reftype($foo2), 'SCALAR', '... Foo is made with SCALAR');
+
 ok(!$foo2->has_foo, '... Foo2::foo is not defined yet');
 is($foo2->foo(), undef, '... Foo2::foo is not defined yet');
 is($foo2->get_bar(), 'FOO is BAR', '... Foo2::bar has been initialized');
@@ -110,6 +115,8 @@ my $bar = Bar->new();
 isa_ok($bar, 'Bar');
 isa_ok($bar, 'Foo');
 
+is(reftype($bar), 'SCALAR', '... Bar is made with SCALAR');
+
 can_ok($bar, 'foo');
 can_ok($bar, 'has_foo');
 can_ok($bar, 'get_bar');
@@ -144,6 +151,8 @@ isa_ok($baz, 'Bar');
 isa_ok($baz, 'Foo');
 isa_ok($baz, 'Baz');
 
+is(reftype($baz), 'SCALAR', '... Bar::Baz is made with SCALAR');
+
 can_ok($baz, 'foo');
 can_ok($baz, 'has_foo');
 can_ok($baz, 'get_bar');