X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Fget_sharedir_file.t;h=221e939dce5809f2a1db149f6f081b9bd8f2b8ab;hb=refs%2Ftags%2F1.41;hp=2ec7cabdd4fd7dd27561ac27fac1b1ba076063fd;hpb=163f1f1f7818c756f327d8b4c9c90d0d4e00832f;p=catagits%2FCatalyst-Devel.git diff --git a/t/get_sharedir_file.t b/t/get_sharedir_file.t index 2ec7cab..221e939 100644 --- a/t/get_sharedir_file.t +++ b/t/get_sharedir_file.t @@ -1,20 +1,20 @@ use strict; use warnings; -use Test::MockObject::Extends; -use Test::More tests => 3; -use Test::Exception; +use Test::More 0.88; +use Test::Fatal; use Catalyst::Helper; -my $i = Test::MockObject::Extends->new('Catalyst::Helper'); +my $i = bless {}, 'Catalyst::Helper'; -throws_ok { +like exception { $i->get_sharedir_file(qw/does not exist and hopefully never will or we are totally screwed.txt/); -} qr/No such/, 'Exception for file not found from ->get_sharedir_file'; +}, qr/Cannot find/, 'Exception for file not found from ->get_sharedir_file'; -lives_ok { - ok($i->get_sharedir_file('makefile.tt'), 'has contents'); -} 'Can get_sharedir_file'; +is exception { + ok($i->get_sharedir_file('Makefile.PL.tt'), 'has contents'); +}, undef, 'Can get_sharedir_file'; +done_testing;