diff options
author | Jesse Luehrs <doy@tozt.net> | 2009-12-19 18:09:54 -0600 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2009-12-19 18:09:54 -0600 |
commit | 08be9e37a8077281197497dae5b56d365afc1cd7 (patch) | |
tree | 5764bb0a5275c3d96b9720e614498783c115ff69 /t/003-subclassing.t | |
parent | 2c90a754cef560595b6b8b659804dfc5b6d817f8 (diff) | |
download | moosex-module-refresh-08be9e37a8077281197497dae5b56d365afc1cd7.tar.gz moosex-module-refresh-08be9e37a8077281197497dae5b56d365afc1cd7.zip |
add test for roles, and fix subclassing test
Diffstat (limited to 't/003-subclassing.t')
-rw-r--r-- | t/003-subclassing.t | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/t/003-subclassing.t b/t/003-subclassing.t index 6a562ee..54b0a40 100644 --- a/t/003-subclassing.t +++ b/t/003-subclassing.t @@ -1,7 +1,8 @@ #!/usr/bin/env perl use strict; use warnings; -use Test::More tests => 10; +use Test::More tests => 11; +use Test::Exception; use MooseX::Module::Refresh; @@ -49,6 +50,16 @@ $foobar = FooBarSub->new(foo => 'FOO'); is($foobar->bar, 'barsub', "We got the right result, still"); is($foobar->foo, 'FOOsub', "We got the right result, still"); +throws_ok { $r->refresh } qr/syntax error.*"has baz"/; + +write_out($file, <<"."); +package FooBar; +use Moose; +has baz => (is => 'ro', predicate => 'foo'); +sub bar { 'baz' } +1; +. + $r->refresh; $foobar = FooBarSub->new(baz => 'FOO'); |