From: Matt S Trout Date: Tue, 8 May 2012 17:21:31 +0000 (+0000) Subject: removed test: using return in Sub::Quote considered unfortunate X-Git-Tag: v0.091005~7 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=d88c6c06d53cb31d9d70fe7d9da91adae990c14d;p=gitmo%2FMoo.git removed test: using return in Sub::Quote considered unfortunate --- diff --git a/xt/moo-coercion-construction-bug.t b/xt/moo-coercion-construction-bug.t deleted file mode 100644 index 47b8b94..0000000 --- a/xt/moo-coercion-construction-bug.t +++ /dev/null @@ -1,40 +0,0 @@ -use strict; -use warnings; -use Test::More; - -{ - package MyTest::Role; - use Moo::Role; - use Sub::Quote; - - has test_attr => ( - isa => quote_sub(q{ die $_[0] . "not an object" unless Scalar::Util::blessed($_[0]) }), - coerce => quote_sub(q{ - return $_[0] if Scalar::Util::blessed($_[0]); - die; - }), - is => 'ro', - required => 1, - ); -} - -{ - package MyTest::ClassOne; - use Moo; - - with 'MyTest::Role'; - -} -{ - package MyTest::ClassTwo; - use Moo; - - with 'MyTest::Role'; -} - -my $t = MyTest::ClassOne->new(test_attr => bless {}, 'Bar'); -my $n = MyTest::ClassTwo->new( test_attr => $t); -is ref($n), 'MyTest::ClassTwo'; - -done_testing; -