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 );
}
}
isa_ok( $gorch, "Moose::Meta::Role" );
ok( $gorch->has_attribute("attr"), "has attribute 'attr'" );
-
-{
- local $TODO = "role attribute isn't a meta attribute yet";
- isa_ok( $gorch->get_attribute("attr"), "Moose::Meta::Attribute" );
-}
+isa_ok( $gorch->get_attribute("attr"), "Moose::Meta::Role::Attribute" );
req_or_has($gorch, "gorch_method");
ok( $gorch->has_method("gorch_method"), "has_method gorch_method" );
isa_ok( $robot, "Moose::Meta::Role" );
ok( $robot->has_attribute("twist"), "has attr 'twist'" );
-
-{
- local $TODO = "role attribute isn't a meta attribute yet";
- isa_ok( $robot->get_attribute("twist"), "Moose::Meta::Attribute" );
-}
+isa_ok( $robot->get_attribute("twist"), "Moose::Meta::Role::Attribute" );
{
req_or_has($robot, "twist");