Clarify that one year starts at the major release which does the deprecation
[gitmo/Moose.git] / t / 020_attributes / 006_attribute_required.t
index 4f65021..95ba4dc 100644 (file)
@@ -3,12 +3,9 @@
 use strict;
 use warnings;
 
-use Test::More tests => 16;
-use Test::Exception;
+use Test::More;
+use Test::Fatal;
 
-BEGIN {
-    use_ok('Moose');
-}
 
 {
     package Foo;
@@ -55,16 +52,17 @@ BEGIN {
 #    Foo->new(bar => 10, boo => undef);
 #} qr/^Attribute \(boo\) is required and cannot be undef/, '... must supply all the required attribute';
 
-lives_ok {
+is( exception {
     Foo->new(bar => 10, baz => undef);
-} '... undef is a valid attribute value';
+}, undef, '... undef is a valid attribute value' );
 
-lives_ok {
+is( exception {
     Foo->new(bar => 10, boo => undef);
-}  '... undef is a valid attribute value';
+}, undef, '... undef is a valid attribute value' );
 
 
-throws_ok {
+like( exception {
     Foo->new;
-} qr/^Attribute \(bar\) is required/, '... must supply all the required attribute';
+}, qr/^Attribute \(bar\) is required/, '... must supply all the required attribute' );
 
+done_testing;