-#!/usr/bin/env perl
use strict;
use warnings;
-use Test::More tests => 15;
+use Test::More;
use Test::Fatal;
-use Test::NoWarnings;
+use if $ENV{AUTHOR_TESTING}, 'Test::Warnings';
{
package MyRole;
ok( (my $instance = MyClass->new), 'instance' );
{
- local $TODO = 'waiting on Moose changes for role support';
+ local $TODO = (Moose->VERSION < 1.9900 ? 'waiting on Moose changes for role support' : undef);
is( exception {
$instance->foo('bar');
- is $instance->foo, 3;
}, undef, 'attribute coercion ran' );
+ is($instance->foo, 3);
}
is( exception {
$instance->untyped_class_attr(10);
is $instance->untyped_class_attr, 10;
}, undef, 'set untyped class attribute' );
+
+done_testing;