use warnings;
use Test::More;
-use Test::Exception;
+use Test::Fatal;
sub req_or_has ($$) {
my ( $role, $method ) = @_;
# this doesn't fail but it produces a requires in the role
# the order doesn't matter
has twist => ( is => "rw" );
- ::lives_ok { with qw(Dancer) };
+ ::is( ::exception { with qw(Dancer) }, undef );
package Dancer::Something;
use Moose;
has twist => ( is => "rw" );
{
- ::lives_ok { with qw(Dancer) };
+ ::is( ::exception { with qw(Dancer) }, undef );
}
package Dancer::80s;
# but due to the deferrence logic that doesn't actually work
{
local our $TODO = "attribute accessor in role doesn't satisfy role requires";
- ::lives_ok { with qw(Dancer::Robot) };
+ ::is( ::exception { with qw(Dancer::Robot) }, undef );
}
package Foo;
{
local our $TODO = "attrs and methods from a role should clash";
- ::dies_ok { with qw(Tree Dog) }
+ ::isnt( ::exception { with qw(Tree Dog) }, undef );
}
}