Revision history for MooseX-Storage
+{{NEXT}}
+ * The test suite now uses Test::Fatal instead of Test::Exception (Karen
+ Etheridge).
+
0.29
* Remove use of Test::TempDir in favor of File::Temp (gphat)
build_requires 'Test::More' => '0.88';
build_requires 'Test::Deep' => '0';
-build_requires 'Test::Exception' => '0';
+build_requires 'Test::Fatal' => '0';
build_requires 'Test::Requires' => '0.05';
author_requires 'Test::Pod' => '1.14';
use warnings;
use Test::More tests => 18;
-use Test::Exception;
+use Test::Fatal;
BEGIN {
use_ok('MooseX::Storage');
$circular->cycle($circular);
- throws_ok {
+ like(exception {
$circular->pack;
- } qr/^Basic Engine does not support cycles/,
- '... cannot collapse a cycle with the basic engine';
+ }, qr/^Basic Engine does not support cycles/,
+ '... cannot collapse a cycle with the basic engine');
}
{
my $packed_circular = { __CLASS__ => 'Circular' };
$packed_circular->{cycle} = $packed_circular;
- throws_ok {
+ like( exception {
Circular->unpack($packed_circular);
- } qr/^Basic Engine does not support cycles/,
- '... cannot expand a cycle with the basic engine';
+ }, qr/^Basic Engine does not support cycles/,
+ '... cannot expand a cycle with the basic engine');
}
{
use warnings;
use Test::More tests => 8;
-use Test::Exception;
+use Test::Fatal;
BEGIN {
use_ok('MooseX::Storage');
authority => 'cpan:JRANDOM',
);
-dies_ok {
+ok(exception {
Foo->unpack(
{
__CLASS__ => 'Foo-0.01-cpan:JRANDOM',
}
}
);
-} '... could not unpack, versions are different ' . $@;
+}, '... could not unpack, versions are different ' . $@);
Moose::Meta::Class->create('Bar',
version => '0.01',
authority => 'cpan:DSTATIC',
);
-dies_ok {
+ok(exception {
Foo->unpack(
{
__CLASS__ => 'Foo-0.01-cpan:JRANDOM',
}
}
);
-} '... could not unpack, authorities are different';
+}, '... could not unpack, authorities are different');
use warnings;
use Test::More tests => 9;
-use Test::Exception;
+use Test::Fatal;
BEGIN {
use_ok('MooseX::Storage');
use warnings;
use Test::More tests => 13;
-use Test::Exception;
+use Test::Fatal;
BEGIN {
use_ok('MooseX::Storage');
use warnings;
use Test::More 'no_plan';#tests => 6;
-use Test::Exception;
+use Test::Fatal;
BEGIN {
use_ok('MooseX::Storage');
use warnings;
use Test::More;
-use Test::Exception;
+use Test::Fatal;
use Test::Deep;
use Test::Requires {
);
my $foo2;
- lives_ok {
+ is( exception {
$foo2 = Foo->unpack($packed);
- } '... unpacked okay';
+ }, undef, '... unpacked okay');
isa_ok($foo2, 'Foo');
cmp_deeply(
use strict;
use warnings;
use Test::More tests => 1;
-use Test::Exception;
+use Test::Fatal;
{
package ClassOne;
use MooseX::Storage;
}
-lives_ok {
+is( exception {
package CombineClasses;
use Moose;
with qw/ClassOne ClassTwo/;
-} 'Can include two roles which both use MooseX::Storage';
+}, undef, 'Can include two roles which both use MooseX::Storage');
use strict;
use warnings;
use Test::More;
-use Test::Exception;
+use Test::Fatal;
use Test::Requires {
'JSON::Any' => 0.01, # skip all if not installed
my $i = Thing->new(foo => "bar");
-lives_ok {
+is( exception {
$i . "";
-} 'Can stringify without deep recursion';
+}, undef, 'Can stringify without deep recursion');
done_testing;