Revert autogenerated tests. Tests should not changed radically.
[gitmo/Mouse.git] / t / 040_type_constraints / 034_duck_types.t
diff --git a/t/040_type_constraints/034_duck_types.t b/t/040_type_constraints/034_duck_types.t
deleted file mode 100644 (file)
index 5eb1093..0000000
+++ /dev/null
@@ -1,86 +0,0 @@
-#!/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;
-$TODO = q{Mouse is not yet completed};
-use Test::Exception;
-
-{
-
-    package Duck;
-    use Mouse;
-
-    sub quack { }
-
-}
-
-{
-
-    package Swan;
-    use Mouse;
-
-    sub honk { }
-
-}
-
-{
-
-    package RubberDuck;
-    use Mouse;
-
-    sub quack { }
-
-}
-
-{
-
-    package DucktypeTest;
-    use Mouse;
-    use Mouse::Util::TypeConstraints;
-
-    duck_type 'DuckType' => qw(quack);
-    duck_type 'SwanType' => [qw(honk)];
-
-    has duck => (
-        isa        => 'DuckType',
-        is => 'ro',
-        lazy_build => 1,
-    );
-
-    sub _build_duck { Duck->new }
-
-    has swan => (
-        isa => duck_type( [qw(honk)] ),
-        is => 'ro',
-    );
-
-    has other_swan => (
-        isa => 'SwanType',
-        is => 'ro',
-    );
-
-}
-
-# try giving it a duck
-lives_ok { DucktypeTest->new( duck => Duck->new ) } 'the Duck lives okay';
-
-# try giving it a swan which is like a duck, but not close enough
-throws_ok { DucktypeTest->new( duck => Swan->new ) }
-qr/Swan is missing methods 'quack'/,
-    "the Swan doesn't quack";
-
-# try giving it a rubber RubberDuckey
-lives_ok { DucktypeTest->new( swan => Swan->new ) } 'but a Swan can honk';
-
-# try giving it a rubber RubberDuckey
-lives_ok { DucktypeTest->new( duck => RubberDuck->new ) }
-'the RubberDuck lives okay';
-
-# try with the other constraint form
-lives_ok { DucktypeTest->new( other_swan => Swan->new ) } 'but a Swan can honk';
-
-done_testing;