From 14809a771da4e82fa3f4557e6276a35fe2193816 Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Mon, 19 Dec 2011 14:13:24 -0600 Subject: cleanups --- t/base2.t | 11 +++++------ 1 file 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; -- cgit v1.2.3