diff options
author | Jesse Luehrs <doy@tozt.net> | 2011-12-19 14:13:24 -0600 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2011-12-19 14:13:24 -0600 |
commit | 14809a771da4e82fa3f4557e6276a35fe2193816 (patch) | |
tree | b9093d2b8966523deca6d1d5347b2c30e4e3892b | |
parent | 9cc8c0a89e3984a04758240a76940bb70f49f256 (diff) | |
download | circular-require-14809a771da4e82fa3f4557e6276a35fe2193816.tar.gz circular-require-14809a771da4e82fa3f4557e6276a35fe2193816.zip |
cleanups0.04
-rw-r--r-- | t/base2.t | 11 |
1 files changed, 5 insertions, 6 deletions
@@ -3,16 +3,15 @@ use strict; use warnings; use lib 't/base2'; use Test::More; -use Test::Exception; -# Test passes if you comment this out no circular::require; use_ok('Foo'); -lives_ok { is( Foo->bar, "bar", "Polymorphism" ) } - "bar() method available on Foo"; +is(Foo->bar, "bar", "Polymorphism"); -throws_ok { base->import( 'BadWolf' ) } - qr|Base class package "BadWolf" is empty|, "use base 'Some Bad File' should throw an exception"; +my $ok = eval "use base 'BadWolf'"; +my $err = $@; +ok(!$ok, "use base 'Some Bad File' should throw an exception"); +like($err, qr/Base class package "BadWolf" is empty/, "correct exception"); done_testing; |