use warnings;
use Test::More;
-use Test::Exception;
+use Test::Fatal;
use Moose::Meta::Role::Application::RoleSummation;
use Moose::Meta::Role::Composite;
ok(Role::DoesExcludesFoo->meta->excludes_role('Role::Foo'), '... got the right exclusions');
# test simple exclusion
-dies_ok {
+isnt( exception {
Moose::Meta::Role::Application::RoleSummation->new->apply(
Moose::Meta::Role::Composite->new(
roles => [
]
)
);
-} '... this fails as expected';
+}, undef, '... this fails as expected' );
# test no conflicts
{
is($c->name, 'Role::Foo|Role::Bar', '... got the composite role name');
- lives_ok {
+ is( exception {
Moose::Meta::Role::Application::RoleSummation->new->apply($c);
- } '... this lives as expected';
+ }, undef, '... this lives as expected' );
}
# test no conflicts w/exclusion
is($c->name, 'Role::Bar|Role::ExcludesFoo', '... got the composite role name');
- lives_ok {
+ is( exception {
Moose::Meta::Role::Application::RoleSummation->new->apply($c);
- } '... this lives as expected';
+ }, undef, '... this lives as expected' );
is_deeply([$c->get_excluded_roles_list], ['Role::Foo'], '... has excluded roles');
}
# test conflict with an "inherited" exclusion
-dies_ok {
+isnt( exception {
Moose::Meta::Role::Application::RoleSummation->new->apply(
Moose::Meta::Role::Composite->new(
roles => [
)
);
-} '... this fails as expected';
+}, undef, '... this fails as expected' );
# test conflict with an "inherited" exclusion of an "inherited" role
-dies_ok {
+isnt( exception {
Moose::Meta::Role::Application::RoleSummation->new->apply(
Moose::Meta::Role::Composite->new(
roles => [
]
)
);
-} '... this fails as expected';
+}, undef, '... this fails as expected' );
done_testing;