'immutable_options is empty before a class is made_immutable'
);
- $meta->make_immutable;
+ ok( $meta->make_immutable, 'make_immutable returns true' );
+ my $line = __LINE__ - 1;
+
+ ok( $meta->make_immutable, 'make_immutable still returns true' );
my $immutable_metaclass = $meta->_immutable_metaclass->meta;
constructor_name => 'new',
constructor_class => 'Class::MOP::Method::Constructor',
destructor_class => undef,
+ file => $0,
+ line => $line,
},
'immutable_options is empty before a class is made_immutable'
);
$meta->make_immutable();
}, undef, '... changed Bar to be immutable' );
- ok( !$meta->make_immutable, '... make immutable now returns nothing' );
+ ok( $meta->make_immutable, '... make immutable returns true' );
ok( !$meta->is_mutable, '... our class is no longer mutable' );
ok( $meta->is_immutable, '... our class is now immutable' );
$meta->make_immutable();
}, undef, '... changed Baz to be immutable' );
- ok( !$meta->make_immutable, '... make immutable now returns nothing' );
+ ok( $meta->make_immutable, '... make immutable returns true' );
ok( !$meta->is_mutable, '... our class is no longer mutable' );
ok( $meta->is_immutable, '... our class is now immutable' );
inline_constructor => 0,
constructor_name => 'newer',
);
+ my $line = __LINE__ - 5;
is_deeply(
{ $meta->immutable_options },
constructor_name => 'newer',
constructor_class => 'Class::MOP::Method::Constructor',
destructor_class => undef,
+ file => $0,
+ line => $line,
},
'custom immutable_options are returned by immutable_options accessor'
);