summaryrefslogtreecommitdiffstats
path: root/t
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2009-05-07 19:04:44 -0500
committerJesse Luehrs <doy@tozt.net>2009-05-07 19:04:44 -0500
commitdbaed0adc3c5139718efd8a23588bfbcf02e11e5 (patch)
tree283b9347230fafe381d6ebe2b8b3121d26cd0cb5 /t
parent4352309685f8fbbb052ee628dc0cd8c299575f2d (diff)
downloadmoosex-nonmoose-dbaed0adc3c5139718efd8a23588bfbcf02e11e5.tar.gz
moosex-nonmoose-dbaed0adc3c5139718efd8a23588bfbcf02e11e5.zip
extend the mx-insideout test a bit
Diffstat (limited to 't')
-rw-r--r--t/032-moosex-insideout.t14
1 files changed, 13 insertions, 1 deletions
diff --git a/t/032-moosex-insideout.t b/t/032-moosex-insideout.t
index 6d3f60e..ea78cf8 100644
--- a/t/032-moosex-insideout.t
+++ b/t/032-moosex-insideout.t
@@ -5,7 +5,7 @@ use Test::More;
BEGIN {
eval "use MooseX::InsideOut ()";
plan skip_all => "MooseX::InsideOut is required for this test" if $@;
- plan tests => 2;
+ plan tests => 8;
}
BEGIN {
@@ -63,3 +63,15 @@ package main;
my $foo = Foo::Moose->new('FOO', bar => 'BAR');
is($foo->foo, 'FOO', 'base class accessor works');
is($foo->bar, 'BAR', 'subclass accessor works');
+$foo->foo('OOF');
+$foo->bar('RAB');
+is($foo->foo, 'OOF', 'base class accessor works (setting)');
+is($foo->bar, 'RAB', 'subclass accessor works (setting)');
+Foo::Moose->meta->make_immutable;
+$foo = Foo::Moose->new('FOO', bar => 'BAR');
+is($foo->foo, 'FOO', 'base class accessor works (immutable)');
+is($foo->bar, 'BAR', 'subclass accessor works (immutable)');
+$foo->foo('OOF');
+$foo->bar('RAB');
+is($foo->foo, 'OOF', 'base class accessor works (setting) (immutable)');
+is($foo->bar, 'RAB', 'subclass accessor works (setting) (immutable)');