X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F047_rebless_with_extra_params.t;h=ee29aa349aa691a63267a214a20bfda63d8f7899;hb=871e9eb5d05b8b9986b2de3f4095f65a31159c56;hp=17af8920371d6771c5bc1bcd165a4d3ff44a07ed;hpb=8371f3de4e9525ab751008dca4a89e6df65345a6;p=gitmo%2FClass-MOP.git diff --git a/t/047_rebless_with_extra_params.t b/t/047_rebless_with_extra_params.t index 17af892..ee29aa3 100644 --- a/t/047_rebless_with_extra_params.t +++ b/t/047_rebless_with_extra_params.t @@ -2,7 +2,7 @@ use strict; use warnings; use Test::More; -use Test::Exception; +use Test::Fatal; use Class::MOP; @@ -27,17 +27,17 @@ use Class::MOP; is($foo->bar, 'BAR', '... got the expect value'); ok(!$foo->can('baz'), '... no baz method though'); - lives_ok { + is( exception { Bar->meta->rebless_instance($foo) - } '... this works'; + }, undef, '... this works' ); is($foo->bar, 'BAR', '... got the expect value'); ok($foo->can('baz'), '... we have baz method now'); is($foo->baz, 'BAZ', '... got the expect value'); - lives_ok { + is( exception { Foo->meta->rebless_instance_back($foo) - } '... this works'; + }, undef, '... this works' ); is($foo->bar, 'BAR', '... got the expect value'); ok(!$foo->can('baz'), '... no baz method though'); } @@ -50,17 +50,17 @@ use Class::MOP; is($foo->bar, 'BAR', '... got the expect value'); ok(!$foo->can('baz'), '... no baz method though'); - lives_ok { + is( exception { Bar->meta->rebless_instance($foo, (baz => 'FOO-BAZ')) - } '... this works'; + }, undef, '... this works' ); is($foo->bar, 'BAR', '... got the expect value'); ok($foo->can('baz'), '... we have baz method now'); is($foo->baz, 'FOO-BAZ', '... got the expect value'); - lives_ok { + is( exception { Foo->meta->rebless_instance_back($foo) - } '... this works'; + }, undef, '... this works' ); is($foo->bar, 'BAR', '... got the expect value'); ok(!$foo->can('baz'), '... no baz method though'); @@ -75,17 +75,17 @@ use Class::MOP; is($foo->bar, 'BAR', '... got the expect value'); ok(!$foo->can('baz'), '... no baz method though'); - lives_ok { + is( exception { Bar->meta->rebless_instance($foo, (bar => 'FOO-BAR', baz => 'FOO-BAZ')) - } '... this works'; + }, undef, '... this works' ); is($foo->bar, 'FOO-BAR', '... got the expect value'); ok($foo->can('baz'), '... we have baz method now'); is($foo->baz, 'FOO-BAZ', '... got the expect value'); - lives_ok { + is( exception { Foo->meta->rebless_instance_back($foo) - } '... this works'; + }, undef, '... this works' ); is($foo->bar, 'FOO-BAR', '... got the expect value'); ok(!$foo->can('baz'), '... no baz method though');