From: Todd Hepler Date: Tue, 27 Mar 2012 20:39:30 +0000 (-0500) Subject: took out *Existing* and added SEE ALSO instead X-Git-Tag: 0_06~4 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=5d7c6a0c4eefc0b0f383cc3db01108d2169eda85;hp=a3caba444330dbce40b6aa348d71e2734e84662f;p=gitmo%2FMooseX-Types-Path-Class.git took out *Existing* and added SEE ALSO instead --- diff --git a/dist.ini b/dist.ini index f7a3e5e..01f9084 100644 --- a/dist.ini +++ b/dist.ini @@ -19,7 +19,6 @@ Path::Class = 0.16 [Prereqs / TestRequires] Test::More = 0.88 -Test::Fatal = 0 [PodSyntaxTests] [PodCoverageTests] diff --git a/t/04.existing.t b/t/04.existing.t deleted file mode 100644 index 0095413..0000000 --- a/t/04.existing.t +++ /dev/null @@ -1,54 +0,0 @@ - -{ - - package Bar; - use Moose; - use MooseX::Types::Path::Class qw( ExistingDir ExistingFile ); - - has 'dir' => ( - is => 'ro', - isa => ExistingDir, - coerce => 1, - ); - - has 'file' => ( - is => 'ro', - isa => ExistingFile, - coerce => 1, - ); -} - -package main; - -use strict; -use warnings; -use Test::More; -use Test::Fatal; - -my $no_exist = '/should/not/exist'; - -plan skip_all => "Preconditions failed; your filesystem is strange" - unless -d "/etc" && -e "/etc/passwd"; - -plan skip_all => "Preconditions failed" - if -e $no_exist; - -use MooseX::Types::Path::Class qw(ExistingFile ExistingDir); - -ok is_ExistingFile(to_ExistingFile("/etc/passwd")), '/etc/passwd is an existing file'; - -ok is_ExistingDir(to_ExistingDir("/etc/")), '/etc/ is an existing directory'; - -like( - exception { Bar->new(dir => $no_exist); }, - qr/Directory .* must exist/, - 'no exist dir throws', -); -like( - exception { Bar->new(file => "$no_exist/either"); }, - qr/File .* must exist/, - 'no exist file throws', -); - -done_testing; -