add todo test for options to make_immutable being saved
Jesse Luehrs [Thu, 10 Sep 2009 01:23:25 +0000 (20:23 -0500)]
t/075_immutable_options_saved.t [new file with mode: 0644]

diff --git a/t/075_immutable_options_saved.t b/t/075_immutable_options_saved.t
new file mode 100644 (file)
index 0000000..ba5e2af
--- /dev/null
@@ -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");
+}