From: Jesse Luehrs Date: Thu, 10 Sep 2009 01:23:25 +0000 (-0500) Subject: add todo test for options to make_immutable being saved X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=099eeb8f085b8969d20c1d63551d1ea99073a773;p=gitmo%2FClass-MOP.git add todo test for options to make_immutable being saved --- diff --git a/t/075_immutable_options_saved.t b/t/075_immutable_options_saved.t new file mode 100644 index 0000000..ba5e2af --- /dev/null +++ b/t/075_immutable_options_saved.t @@ -0,0 +1,23 @@ +use strict; +use warnings; + +use Test::More tests => 4; + +use Class::MOP; + +my $meta = Class::MOP::Class->create('Foo'); + +$meta->make_immutable(constructor_name => 'foo'); +ok($meta->has_method('foo'), + "constructor is generated with correct name"); +ok(!$meta->has_method('new'), + "constructor is not generated with incorrect name"); + +$meta->make_mutable; +$meta->make_immutable; +{ local $TODO = "make_immutable doesn't save options yet"; +ok($meta->has_method('foo'), + "constructor is generated with correct name by default after roundtrip"); +ok(!$meta->has_method('new'), + "constructor is not generated with incorrect name by default after roundtrip"); +}