From: stevan Date: Sat, 5 Aug 2006 21:23:10 +0000 (+0000) Subject: basic-test X-Git-Tag: 0_01~14 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=5d1afb587de9486c5740ff030d6a60b434634c4a;p=gitmo%2FMoose-Policy.git basic-test --- diff --git a/t/001_basic.t b/t/001_basic.t index cdc3c2b..549a5c6 100644 --- a/t/001_basic.t +++ b/t/001_basic.t @@ -33,6 +33,28 @@ BEGIN { { package My::Moose::Policy; + use constant attribute_metaclass => 'My::Moose::Meta::Attribute'; +} + +{ + package Foo; + use Moose::Policy 'My::Moose::Policy'; + use Moose; -} \ No newline at end of file + has 'bar' => (default => 'Foo::bar'); +} + + +my $foo = Foo->new; +isa_ok($foo, 'Foo'); + +can_ok($foo, 'get_bar'); +can_ok($foo, 'set_bar'); + +is($foo->get_bar, 'Foo::bar', '... got the right default value'); + + + + +