c3d08c08fccc6edeed989909ecdaf0cb8ce39a9b
[p5sagit/Function-Parameters.git] / t / foreign / Method-Signatures / typeload_moose.t
1 #!perl
2
3 use strict;
4 use warnings FATAL => 'all';
5 use Dir::Self;
6 use lib __DIR__ . '/lib';
7
8 use Test::More
9         eval { require Moose; 1 }
10         ? (tests => 2)
11         : (skip_all => "Moose required for testing types")
12 ;
13
14
15 require MooseLoadTest;
16
17 my $foobar = Foo::Bar->new;
18
19 # can't check for type module not being loaded here, because Moose will drag it in
20
21
22 $foobar->check_int(42);
23
24 # now we should have loaded Moose, not Mouse, to do our type checking
25
26 is $INC{'Mouse/Util/TypeConstraints.pm'}, undef, "didn't load Mouse";
27 like $INC{'Moose/Util/TypeConstraints.pm'}, qr{Moose/Util/TypeConstraints\.pm$}, 'loaded Moose';