use strict;
use warnings;
-use Test::More tests => 21;
-use Test::Exception;
-
+use Test::More;
+use Test::Fatal;
{
is($foo->bar, 'BAR', '... got the expect value');
ok(!$foo->can('baz'), '... no baz method though');
- lives_ok {
+ is( exception {
Bar->meta->apply($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->bar, 'BAR', '... got the expect value');
ok(!$foo->can('baz'), '... no baz method though');
- lives_ok {
+ is( exception {
Bar->meta->apply($foo, (rebless_params => { 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->bar, 'BAR', '... got the expect value');
ok(!$foo->can('baz'), '... no baz method though');
- lives_ok {
+ is( exception {
Bar->meta->apply($foo, (rebless_params => { 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');
}
-
+done_testing;