diff options
author | Justin Hunter <justin.d.hunter@gmail.com> | 2010-10-26 13:55:17 -0700 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2010-10-27 11:13:42 -0500 |
commit | 13f4d7c3ee749b18ba8b16e2cfc475e7471dd43c (patch) | |
tree | 44b9c96a069710bdce56ea3062662f708b6bc000 /t/02-extension.t | |
parent | 41fc247afe43b3ca9bce931d224935a7bcf5a3bf (diff) | |
download | package-stash-13f4d7c3ee749b18ba8b16e2cfc475e7471dd43c.tar.gz package-stash-13f4d7c3ee749b18ba8b16e2cfc475e7471dd43c.zip |
move from Test::Exception to Test::Fatal
Diffstat (limited to 't/02-extension.t')
-rw-r--r-- | t/02-extension.t | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/t/02-extension.t b/t/02-extension.t index f639cfa..1ac20c0 100644 --- a/t/02-extension.t +++ b/t/02-extension.t @@ -2,7 +2,7 @@ use strict; use warnings; use Test::More; -use Test::Exception; +use Test::Fatal; { package My::Package::Stash; @@ -40,9 +40,9 @@ isa_ok($foo_stash, 'Package::Stash'); ok(!defined($Foo::{foo}), '... the %foo slot has not been created yet'); ok(!$foo_stash->has_package_symbol('%foo'), '... the foo_stash agrees'); -lives_ok { +ok(!exception { $foo_stash->add_package_symbol('%foo' => { one => 1 }); -} '... the %foo symbol is created succcessfully'; +}, '... the %foo symbol is created succcessfully'); ok(!defined($Foo::{foo}), '... the %foo slot has not been created in the actual Foo package'); ok($foo_stash->has_package_symbol('%foo'), '... the foo_stash agrees'); @@ -56,17 +56,17 @@ is($foo, $foo_stash->get_package_symbol('%foo'), '... our %foo is the same as th ok(!defined($Foo::{bar}), '... the @bar slot has not been created yet'); -lives_ok { +ok(!exception { $foo_stash->add_package_symbol('@bar' => [ 1, 2, 3 ]); -} '... created @Foo::bar successfully'; +}, '... created @Foo::bar successfully'); ok(!defined($Foo::{bar}), '... the @bar slot has still not been created'); ok(!defined($Foo::{baz}), '... the %baz slot has not been created yet'); -lives_ok { +ok(!exception { $foo_stash->add_package_symbol('%baz'); -} '... created %Foo::baz successfully'; +}, '... created %Foo::baz successfully'); ok(!defined($Foo::{baz}), '... the %baz slot has still not been created'); |