X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F040_type_constraints%2F032_throw_error.t;fp=t%2F040_type_constraints%2F032_throw_error.t;h=2d15a06b7b5ea7942f6c50079f04e175f005049a;hb=6ea989334e1c9d7f3be7539418b582f0faea73f2;hp=0000000000000000000000000000000000000000;hpb=05a07591ff9319f5c7391f151e26b886bd468c73;p=gitmo%2FMoose.git diff --git a/t/040_type_constraints/032_throw_error.t b/t/040_type_constraints/032_throw_error.t new file mode 100644 index 0000000..2d15a06 --- /dev/null +++ b/t/040_type_constraints/032_throw_error.t @@ -0,0 +1,12 @@ +use strict; +use warnings; + +use Test::More tests => 1; + +use Moose::Util::TypeConstraints; + + +eval { Moose::Util::TypeConstraints::create_type_constraint_union() }; + +like( $@, qr/\QYou must pass in at least 2 type names to make a union/, + 'can throw a proper error without Moose being loaded by the caller' );