use strict;
use warnings;
-use Test::Exception;
+use Test::Fatal;
use Test::More;
use Test::Requires {
use Moose;
- ::lives_and(
+ ::is( ::exception (
sub {
::stderr_like{ has foo => (
traits => ['String'],
'thing2 method is created as alias in role application'
);
}
- );
+ ), undef );
}
{
use Moose;
- ::lives_and(
+ ::is( ::exception (
sub {
::stderr_is{ has foo => (
traits => ['String'],
::stderr_is{ Pack1->new->_bar } q{},
'Providing a reader for a String trait avoids default is warning';
}
- );
+ ), undef );
sub _build_foo { q{} }
}
use Moose;
- ::lives_and(
+ ::is( ::exception (
sub {
::stderr_is{ has foo => (
traits => ['String'],
q{},
'Providing a writer for a String trait avoids default is warning';
}
- );
+ ), undef );
}
{
use Moose;
- ::lives_and(
+ ::is( ::exception (
sub {
::stderr_is{ has foo => (
traits => ['String'],
q{},
'Providing a accessor for a String trait avoids default is warning';
}
- );
+ ), undef );
sub _build_foo { q{} }
}