use warnings;
use Test::More;
-use Test::Fatal;
+use Test::Exception;
use Class::MOP;
is($foo->bar, 'BAR', '... got the expect value');
ok(!$foo->can('baz'), '... no baz method though');
- ok ! exception {
+ lives_ok {
Bar->meta->rebless_instance($foo)
- }, '... this works';
+ } '... 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');
- ok ! exception {
+ lives_ok {
Foo->meta->rebless_instance_back($foo)
- }, '... this works';
+ } '... this works';
is($foo->bar, 'BAR', '... got the expect value');
ok(!$foo->can('baz'), '... no baz method though');
}
is($foo->bar, 'BAR', '... got the expect value');
ok(!$foo->can('baz'), '... no baz method though');
- ok ! exception {
+ lives_ok {
Bar->meta->rebless_instance($foo, (baz => 'FOO-BAZ'))
- }, '... this works';
+ } '... 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');
- ok ! exception {
+ lives_ok {
Foo->meta->rebless_instance_back($foo)
- }, '... this works';
+ } '... this works';
is($foo->bar, 'BAR', '... got the expect value');
ok(!$foo->can('baz'), '... no baz method though');
is($foo->bar, 'BAR', '... got the expect value');
ok(!$foo->can('baz'), '... no baz method though');
- ok ! exception {
+ lives_ok {
Bar->meta->rebless_instance($foo, (bar => 'FOO-BAR', baz => 'FOO-BAZ'))
- }, '... this works';
+ } '... 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');
- ok ! exception {
+ lives_ok {
Foo->meta->rebless_instance_back($foo)
- }, '... this works';
+ } '... this works';
is($foo->bar, 'FOO-BAR', '... got the expect value');
ok(!$foo->can('baz'), '... no baz method though');