Mouse::Util::does_role() respects $thing->does() method
[gitmo/Mouse.git] / t / 040_type_constraints / 003_util_std_type_constraints.t
index 0ce13fb..1f7a4ec 100644 (file)
@@ -1,4 +1,7 @@
 #!/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;
@@ -6,7 +9,6 @@ use warnings;
 use Test::More;
 use Test::Exception;
 
-use t::lib::MooseCompat;
 use Scalar::Util ();
 
 BEGIN {
@@ -192,6 +194,7 @@ ok(!defined ScalarRef([]),               '... ScalarRef rejects anything which i
 ok(!defined ScalarRef({}),               '... ScalarRef rejects anything which is not a ScalarRef');
 ok(!defined ScalarRef(sub {}),           '... ScalarRef rejects anything which is not a ScalarRef');
 ok(defined ScalarRef($SCALAR_REF),       '... ScalarRef accepts anything which is a ScalarRef');
+ok(defined ScalarRef(\$SCALAR_REF),      '... ScalarRef accepts references to references');
 ok(!defined ScalarRef($GLOB),            '... ScalarRef rejects anything which is not a ScalarRef');
 ok(!defined ScalarRef($GLOB_REF),        '... ScalarRef rejects anything which is not a ScalarRef');
 ok(!defined ScalarRef($fh),              '... ScalarRef rejects anything which is not a ScalarRef');