import more Method::Signatures tests
[p5sagit/Function-Parameters.git] / t / foreign / Method-Signatures / typeload_moose.t
CommitLineData
700071de 1#!perl
2
3use strict;
4use warnings FATAL => 'all';
5use Dir::Self;
6use lib __DIR__ . '/lib';
7
8use Test::More
9 eval { require Moose; 1 }
10 ? (tests => 2)
11 : (skip_all => "Moose required for testing types")
12;
13
14
15require MooseLoadTest;
16
17my $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
26is $INC{'Mouse/Util/TypeConstraints.pm'}, undef, "didn't load Mouse";
27like $INC{'Moose/Util/TypeConstraints.pm'}, qr{Moose/Util/TypeConstraints\.pm$}, 'loaded Moose';