summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2011-12-19 14:13:24 -0600
committerJesse Luehrs <doy@tozt.net>2011-12-19 14:13:24 -0600
commit14809a771da4e82fa3f4557e6276a35fe2193816 (patch)
treeb9093d2b8966523deca6d1d5347b2c30e4e3892b
parent9cc8c0a89e3984a04758240a76940bb70f49f256 (diff)
downloadcircular-require-14809a771da4e82fa3f4557e6276a35fe2193816.tar.gz
circular-require-14809a771da4e82fa3f4557e6276a35fe2193816.zip
cleanups0.04
-rw-r--r--t/base2.t11
1 files changed, 5 insertions, 6 deletions
diff --git a/t/base2.t b/t/base2.t
index cb85df3..844a7eb 100644
--- a/t/base2.t
+++ b/t/base2.t
@@ -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;