X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F313_before_after_dollar_under.t;h=01d8da17f1d619d5ccb56639ec7b4c0adcc5f7ee;hb=8371f3de4e9525ab751008dca4a89e6df65345a6;hp=1ebef2c2a7faa534ab08d045aa4d8156bd7fc099;hpb=d65739b4429cbd77a5400b2ac8273af504fcf3da;p=gitmo%2FClass-MOP.git diff --git a/t/313_before_after_dollar_under.t b/t/313_before_after_dollar_under.t index 1ebef2c..01d8da1 100644 --- a/t/313_before_after_dollar_under.t +++ b/t/313_before_after_dollar_under.t @@ -4,7 +4,7 @@ use warnings; use Class::MOP; use Class::MOP::Class; use Test::More; -use Test::Fatal; +use Test::Exception; my %results; @@ -29,11 +29,11 @@ for my $wrap (qw(before after)) { %results = (); my $o = $meta->get_meta_instance->create_instance; isa_ok( $o, 'Base' ); - ok ! exception { + lives_ok { $o->hey; $o->hey ; # this would die with 'Can't use string ("barf") as a subroutine ref while "strict refs" in use' - }, + } 'wrapped doesn\'t die when $_ gets changed'; is_deeply( \%results, { base => 2, wrapped => 2 }, @@ -57,11 +57,11 @@ for my $wrap (qw(before after)) { %results = (); my $o = $meta->get_meta_instance->create_instance; isa_ok( $o, 'Base' ); - ok ! exception { + lives_ok { $o->hey; $o->hey ; # this would die with 'Can't use string ("barf") as a subroutine ref while "strict refs" in use' - }, + } 'double-wrapped doesn\'t die when $_ gets changed'; is_deeply( \%results, { base => 2, wrapped => 4 },