bump version to 0.84
[gitmo/Class-MOP.git] / t / 020_attribute.t
index 30bb9cd..cad88e2 100644 (file)
@@ -1,11 +1,9 @@
-#!/usr/bin/perl
-
 use strict;
 use warnings;
 
 use Scalar::Util 'reftype', 'blessed';
 
-use Test::More tests => 104;
+use Test::More tests => 100;
 use Test::Exception;
 
 use Class::MOP;
@@ -227,25 +225,3 @@ dies_ok { Class::MOP::Attribute->name } q{... can't call name() as a class metho
     is($attr->builder, 'foo_builder', '... $attr->builder == foo_builder');
 
 }
-
-{
-    for my $value ({}, bless({}, 'Foo')) {
-        throws_ok {
-            Class::MOP::Attribute->new('$foo', default => $value);
-        } qr/References are not allowed as default values/;
-    }
-}
-
-{
-    {
-        package Method;
-        use overload '&{}' => sub { sub { $_[0] } };
-    }
-
-    my $attr;
-    lives_ok {
-        $attr = Class::MOP::Attribute->new('$foo', default => bless({}, 'Method'));
-    } 'objects with overloaded codification accepted as default';
-
-    is($attr->default(42), 42, 'default calculated correctly with overloaded object');
-}