Fix RT#65907: missing build require: Test::Exception
[catagits/Catalyst-Devel.git] / t / get_sharedir_file.t
CommitLineData
163f1f1f 1use strict;
2use warnings;
3
bc750d3b 4use Test::More 0.88;
5use Test::Fatal;
163f1f1f 6
7use Catalyst::Helper;
8
0d4859fc 9my $i = bless {}, 'Catalyst::Helper';
163f1f1f 10
bc750d3b 11like exception {
163f1f1f 12 $i->get_sharedir_file(qw/does not exist and hopefully never will or we are
13 totally screwed.txt/);
bc750d3b 14}, qr/Cannot find/, 'Exception for file not found from ->get_sharedir_file';
163f1f1f 15
bc750d3b 16is exception {
625dcb30 17 ok($i->get_sharedir_file('Makefile.PL.tt'), 'has contents');
bc750d3b 18}, undef, 'Can get_sharedir_file';
163f1f1f 19
0d4859fc 20done_testing;