Cleanup failing tests
[gitmo/Mouse.git] / Moose-t-failing / 040_type_constraints / 030_class_subtypes.t
@@ -1,9 +1,13 @@
 #!/usr/bin/perl
+# This is automatically generated by author/import-moose-test.pl.
+# DO NOT EDIT THIS FILE. ANY CHANGES WILL BE LOST!!!
+use t::lib::MooseCompat;
 
 use strict;
 use warnings;
 
-use Test::More tests => 26;
+use Test::More;
+$TODO = q{Mouse is not yet completed};
 use Test::Exception;
 
 use Mouse::Util::TypeConstraints;
@@ -13,7 +17,7 @@ use Mouse::Meta::TypeConstraint;
 ## Create a subclass with a custom method
 
 {
-    package Test::Mouse::Meta::TypeConstraint::AnySubType;
+    package Test::Mouse::Meta::TypeConstraint;
     use Mouse;
     extends 'Mouse::Meta::TypeConstraint';
 
@@ -23,11 +27,11 @@ use Mouse::Meta::TypeConstraint;
 }
 
 my $Int = find_type_constraint('Int');
-ok $Int, 'Got a good type contstraint';
+ok $Int, 'Got a good type constraint';
 
-my $parent  = Test::Mouse::Meta::TypeConstraint::AnySubType->new({
-               name => "Test::Mouse::Meta::TypeConstraint::AnySubType" ,
-               parent => $Int,
+my $parent  = Test::Mouse::Meta::TypeConstraint->new({
+        name => "Test::Mouse::Meta::TypeConstraint" ,
+        parent => $Int,
 });
 
 ok $parent, 'Created type constraint';
@@ -80,10 +84,10 @@ ok $isa_foo, 'Created subtype of Foo type';
 ok $isa_foo->check( Foo->new ), 'Foo passes check';
 ok $isa_foo->check( Bar->new ), 'Bar passes check';
 ok ! $isa_foo->check( Baz->new ), 'Baz does not pass check';
-like $foo->get_message( Baz->new ), qr/^Validation failed for 'Foo' failed with value Baz=HASH\(0x\w+\) \(not isa Foo\)/, 'Better validation message';
+like $foo->get_message( Baz->new ), qr/^Validation failed for 'Foo' with value Baz=HASH\(0x\w+\) \(not isa Foo\)/, 'Better validation message';
 
 # Maybe in the future this *should* inherit?
-like $isa_foo->get_message( Baz->new ), qr/^Validation failed for 'IsaFoo' failed with value Baz=HASH\(0x\w+\)$/, "Subtypes do not automatically inherit parent type's message";
+like $isa_foo->get_message( Baz->new ), qr/^Validation failed for 'IsaFoo' with value Baz=HASH\(0x\w+\)$/, "Subtypes do not automatically inherit parent type's message";
 
 
 # Implicit types
@@ -100,7 +104,7 @@ like $isa_foo->get_message( Baz->new ), qr/^Validation failed for 'IsaFoo' faile
 
 throws_ok {
     Quux->new(age => 3)
-} qr/^Attribute \(age\) does not pass the type constraint because: Validation failed for 'Positive' failed with value 3 \(not isa Positive\)/;
+} qr/^Attribute \(age\) does not pass the type constraint because: Validation failed for 'Positive' with value 3 \(not isa Positive\)/;
 
 lives_ok {
     Quux->new(age => (bless {}, 'Positive'));
@@ -113,7 +117,7 @@ eval "
 
 throws_ok {
     Quux->new(age => 3)
-} qr/^Attribute \(age\) does not pass the type constraint because: Validation failed for 'Positive' failed with value 3 \(not isa Positive\)/;
+} qr/^Attribute \(age\) does not pass the type constraint because: Validation failed for 'Positive' with value 3 \(not isa Positive\)/;
 
 lives_ok {
     Quux->new(age => Positive->new)
@@ -139,3 +143,5 @@ throws_ok {
 lives_ok {
     Quux::Ier->new(age => (bless {}, 'Negative'))
 };
+
+done_testing;