From dbaed0adc3c5139718efd8a23588bfbcf02e11e5 Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Thu, 7 May 2009 19:04:44 -0500 Subject: extend the mx-insideout test a bit --- t/032-moosex-insideout.t | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 't') 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)'); -- cgit v1.2.3-54-g00ecf