X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F020_attributes%2F001_attribute_reader_generation.t;h=5c625e8d34d9748f0f282c42c26d618c46abc269;hb=f0b2e5673e864903e74a429565d0c57b69a60b95;hp=407633dca83a1de71e49664609e9e70f2f582d8a;hpb=312e0f0ca905063976cb0687da5d0b656157008b;p=gitmo%2FMoose.git diff --git a/t/020_attributes/001_attribute_reader_generation.t b/t/020_attributes/001_attribute_reader_generation.t index 407633d..5c625e8 100644 --- a/t/020_attributes/001_attribute_reader_generation.t +++ b/t/020_attributes/001_attribute_reader_generation.t @@ -3,9 +3,8 @@ use strict; use warnings; -use Test::More tests => 20; -use Test::Exception; - +use Test::More; +use Test::Fatal; { @@ -45,17 +44,17 @@ use Test::Exception; can_ok($foo, 'get_foo'); is($foo->get_foo(), undef, '... got an undefined value'); - dies_ok { + isnt( exception { $foo->get_foo(100); - } '... get_foo is a read-only'; + }, undef, '... get_foo is a read-only' ); ok(!exists($foo->{lazy_foo}), '... no value in get_lazy_foo slot'); can_ok($foo, 'get_lazy_foo'); is($foo->get_lazy_foo(), 10, '... got an deferred value'); - dies_ok { + isnt( exception { $foo->get_lazy_foo(100); - } '... get_lazy_foo is a read-only'; + }, undef, '... get_lazy_foo is a read-only' ); } { @@ -83,5 +82,4 @@ use Test::Exception; is($foo->get_lazy_foo(), 100, '... got the correct value'); } - - +done_testing;