change canonical repo to https://github.com/moose/MooseX-Types-Path-Class
[gitmo/MooseX-Types-Path-Class.git] / t / 03.subtype.t
CommitLineData
fdee25e8 1
2use warnings FATAL => 'all';
3use strict;
4
5use MooseX::Types::Path::Class qw(Dir File);
6use Moose::Util::TypeConstraints;
7
8use Test::More;
9
10plan tests => 4;
11
12# check that Dir is a subtype of Path::Class::Dir, etc...
13
14my $tc;
15$tc = find_type_constraint(Dir);
16isa_ok( $tc, 'Moose::Meta::TypeConstraint' );
17ok( $tc->is_subtype_of('Path::Class::Dir'),
18 'Dir is subtype of Path::Class::Dir'
19);
20$tc = find_type_constraint(File);
21isa_ok( $tc, 'Moose::Meta::TypeConstraint' );
22ok( $tc->is_subtype_of('Path::Class::File'),
23 'File is subtype of Path::Class::File'
24);
25