X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F313_before_after_dollar_under.t;h=65f97744218f2fa2a0f217d79209e3190451a798;hb=871e9eb5d05b8b9986b2de3f4095f65a31159c56;hp=01d8da17f1d619d5ccb56639ec7b4c0adcc5f7ee;hpb=86a4d8730cfe673db674c692f7703632b700c7c9;p=gitmo%2FClass-MOP.git diff --git a/t/313_before_after_dollar_under.t b/t/313_before_after_dollar_under.t index 01d8da1..65f9774 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::Exception; +use Test::Fatal; my %results; @@ -29,12 +29,11 @@ for my $wrap (qw(before after)) { %results = (); my $o = $meta->get_meta_instance->create_instance; isa_ok( $o, 'Base' ); - lives_ok { + is( exception { $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'; + }, undef, 'wrapped doesn\'t die when $_ gets changed' ); is_deeply( \%results, { base => 2, wrapped => 2 }, 'saw expected calls to wrappers' @@ -57,12 +56,11 @@ for my $wrap (qw(before after)) { %results = (); my $o = $meta->get_meta_instance->create_instance; isa_ok( $o, 'Base' ); - lives_ok { + is( exception { $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'; + }, undef, 'double-wrapped doesn\'t die when $_ gets changed' ); is_deeply( \%results, { base => 2, wrapped => 4 }, 'saw expected calls to wrappers'