[Catalyst-commits] r10507 - Catalyst-Devel/1.00/branches/helper_refactor/t

t0m at dev.catalyst.perl.org t0m at dev.catalyst.perl.org
Fri Jun 12 00:29:43 GMT 2009


Author: t0m
Date: 2009-06-12 00:29:43 +0000 (Fri, 12 Jun 2009)
New Revision: 10507

Added:
   Catalyst-Devel/1.00/branches/helper_refactor/t/get_sharedir_file.t
Log:
Basic test for get_sharedir_file

Added: Catalyst-Devel/1.00/branches/helper_refactor/t/get_sharedir_file.t
===================================================================
--- Catalyst-Devel/1.00/branches/helper_refactor/t/get_sharedir_file.t	                        (rev 0)
+++ Catalyst-Devel/1.00/branches/helper_refactor/t/get_sharedir_file.t	2009-06-12 00:29:43 UTC (rev 10507)
@@ -0,0 +1,20 @@
+use strict;
+use warnings;
+
+use Test::MockObject::Extends;
+use Test::More tests => 3;
+use Test::Exception;
+
+use Catalyst::Helper;
+
+my $i = Test::MockObject::Extends->new('Catalyst::Helper');
+
+throws_ok {
+    $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';
+
+lives_ok {
+    ok($i->get_sharedir_file('makefile.tt'), 'has contents');
+} 'Can get_sharedir_file';
+




More information about the Catalyst-commits mailing list