2 use warnings FATAL => 'all';
5 eval { require MooseX::Getopt; };
7 plan( skip_all => 'MooseX::Getopt required for this test' );
14 with 'MooseX::Getopt';
15 use MooseX::Types::Path::Class;
19 isa => 'Path::Class::Dir',
26 isa => 'Path::Class::File',
36 with 'MooseX::Getopt';
37 use MooseX::Types::Path::Class qw( Dir File );
60 my $dir = dir('', 'tmp');
61 my $file = file('', 'tmp', 'foo');
65 isa_ok( $o->dir, 'Path::Class::Dir' );
66 cmp_ok( $o->dir, 'eq', "$dir", "dir is $dir" );
67 isa_ok( $o->file, 'Path::Class::File' );
68 cmp_ok( $o->file, 'eq', "$file", "file is $file" );
71 for my $class (qw(Foo Bar)) {
74 $o = $class->new( dir => "$dir", file => [ '', 'tmp', 'foo' ] );
83 $o = $class->new_with_options;