[Catalyst-commits] r10572 -
Catalyst-Devel/1.00/branches/helper_refactor/t
dhoss at dev.catalyst.perl.org
dhoss at dev.catalyst.perl.org
Wed Jun 17 11:09:18 GMT 2009
Author: dhoss
Date: 2009-06-17 11:09:18 +0000 (Wed, 17 Jun 2009)
New Revision: 10572
Added:
Catalyst-Devel/1.00/branches/helper_refactor/t/render_file_contents.t
Catalyst-Devel/1.00/branches/helper_refactor/t/render_share_dir_file.t
Log:
added tests for new methods
Added: Catalyst-Devel/1.00/branches/helper_refactor/t/render_file_contents.t
===================================================================
--- Catalyst-Devel/1.00/branches/helper_refactor/t/render_file_contents.t (rev 0)
+++ Catalyst-Devel/1.00/branches/helper_refactor/t/render_file_contents.t 2009-06-17 11:09:18 UTC (rev 10572)
@@ -0,0 +1,19 @@
+use strict;
+use warnings;
+use FindBin qw/$Bin/;
+use lib "$Bin/lib";
+use Catalyst::Helper;
+use MyTestHelper;
+
+use Test::More tests => 1;
+
+my $helper = bless {}, 'MyTestHelper';
+
+package MyTestHelper;
+use Test::More;
+use File::Temp qw/tempfile/;
+
+my ($fh, $fn) = tempfile;
+close $fh;
+
+ok( $helper->render_file_contents('example1', $fn, { test_var => 'test_val' }), "file contents rendered" );
Added: Catalyst-Devel/1.00/branches/helper_refactor/t/render_share_dir_file.t
===================================================================
--- Catalyst-Devel/1.00/branches/helper_refactor/t/render_share_dir_file.t (rev 0)
+++ Catalyst-Devel/1.00/branches/helper_refactor/t/render_share_dir_file.t 2009-06-17 11:09:18 UTC (rev 10572)
@@ -0,0 +1,20 @@
+use strict;
+use warnings;
+use FindBin qw/$Bin/;
+use lib "$Bin/lib";
+use Catalyst::Helper;
+use MyTestHelper;
+
+use Test::More tests => 1;
+
+my $helper = bless {}, 'MyTestHelper';
+
+package MyTestHelper;
+use FindBin qw/$Bin/;
+use Test::More;
+use File::Temp qw/tempfile/;
+
+my ($fh, $fn) = tempfile;
+close $fh;
+
+ok( $helper->render_sharedir_file('script/myapp_cgi.pl.tt', { appprefix => 'fnargh' }), "sharedir file rendered" );
More information about the Catalyst-commits
mailing list