X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F018_anon_class.t;h=1b0687911a75edde2f982b4a6170d020d20f3a48;hb=1322c26b43bfd579ca9f2921b7f26674a6d245f2;hp=d7a01977aa1f3bb4236b16c204633486f66cb991;hpb=13b8971fa6cc4edf7d55a2e5482820d62ba38f16;p=gitmo%2FClass-MOP.git diff --git a/t/018_anon_class.t b/t/018_anon_class.t index d7a0197..1b06879 100644 --- a/t/018_anon_class.t +++ b/t/018_anon_class.t @@ -31,18 +31,18 @@ my $anon_class_id; [$anon_class->superclasses], [], '... got an empty superclass list'); - ok ! exception { + is( exception { $anon_class->superclasses('Foo'); - }, '... can add a superclass to anon class'; + }, undef, '... can add a superclass to anon class' ); is_deeply( [$anon_class->superclasses], [ 'Foo' ], '... got the right superclass list'); ok(!$anon_class->has_method('foo'), '... no foo method'); - ok ! exception { + is( exception { $anon_class->add_method('foo' => sub { "__ANON__::foo" }); - }, '... added a method to my anon-class'; + }, undef, '... added a method to my anon-class' ); ok($anon_class->has_method('foo'), '... we have a foo method now'); $instance = $anon_class->new_object();