[Catalyst-commits] r12053 - in
Catalyst-Devel/1.00/branches/helper_refactor: . t
t0m at dev.catalyst.perl.org
t0m at dev.catalyst.perl.org
Fri Nov 27 02:07:28 GMT 2009
Author: t0m
Date: 2009-11-27 02:07:28 +0000 (Fri, 27 Nov 2009)
New Revision: 12053
Modified:
Catalyst-Devel/1.00/branches/helper_refactor/Makefile.PL
Catalyst-Devel/1.00/branches/helper_refactor/TODO.devel
Catalyst-Devel/1.00/branches/helper_refactor/t/generated_app.t
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:
More tests, bump required Cat version, update TODO
Modified: Catalyst-Devel/1.00/branches/helper_refactor/Makefile.PL
===================================================================
--- Catalyst-Devel/1.00/branches/helper_refactor/Makefile.PL 2009-11-27 01:44:43 UTC (rev 12052)
+++ Catalyst-Devel/1.00/branches/helper_refactor/Makefile.PL 2009-11-27 02:07:28 UTC (rev 12053)
@@ -7,7 +7,7 @@
requires 'File::ShareDir';
requires 'namespace::clean';
requires 'namespace::autoclean';
-requires 'Catalyst' => '5.8000';
+requires 'Catalyst' => '5.8001402';
requires 'Catalyst::Action::RenderView' => '0.04';
requires 'Catalyst::Plugin::Static::Simple' => '0.16';
requires 'Catalyst::Plugin::ConfigLoader';
Modified: Catalyst-Devel/1.00/branches/helper_refactor/TODO.devel
===================================================================
--- Catalyst-Devel/1.00/branches/helper_refactor/TODO.devel 2009-11-27 01:44:43 UTC (rev 12052)
+++ Catalyst-Devel/1.00/branches/helper_refactor/TODO.devel 2009-11-27 02:07:28 UTC (rev 12053)
@@ -1,4 +1,5 @@
-. More tests
-. Test component class generation
-. Test TT helper generation
-
+. Manually test script_create and component class creation
+. Tests for component class generation in generated app
+. Manually test TT helper generation
+. More attributes in ::Helper?
+. Tests for Helper construction by other things (what does TT helper do for example)
Modified: Catalyst-Devel/1.00/branches/helper_refactor/t/generated_app.t
===================================================================
--- Catalyst-Devel/1.00/branches/helper_refactor/t/generated_app.t 2009-11-27 01:44:43 UTC (rev 12052)
+++ Catalyst-Devel/1.00/branches/helper_refactor/t/generated_app.t 2009-11-27 02:07:28 UTC (rev 12053)
@@ -10,7 +10,7 @@
use Test::More;
-diag "In $dir";
+diag "Generated app is in $dir";
{
my $exit;
@@ -59,13 +59,13 @@
if ($fn =~ /script/) {
ok -x $fn, "$fn is executable";
}
+ if ($fn =~ /\.p[ml]/) {
+ is system($^X, '-c', $fn), 0, "$fn compiles";
+ }
}
-## Makefile stuff
-my $makefile_status = `$^X Makefile.PL`;
-ok $makefile_status, "Makefile ran okay";
-ok -e "Makefile", "Makefile exists";
-
+is system($^X, 'Makefile.PL'), 0, 'Ran Makefile.PL';
+ok -e "Makefile", "Makefile generated";
is system("make"), 0, 'Run make';
{
@@ -79,11 +79,12 @@
}
my $server_script = do {
- open(my $fh, '<', 'script/testapp_server.pl') or die $!;
+ open(my $fh, '<', File::Spec->catdir(qw/script testapp_server.pl/)) or fail $!;
local $/;
<$fh>;
};
+ok $server_script;
ok $server_script =~ qr/CATALYST_SCRIPT_GEN}\s+=\s+(\d+)/,
'SCRIPT_GEN found in generated output';
is $1, $Catalyst::Devel::CATALYST_SCRIPT_GEN, 'Script gen correct';
Modified: Catalyst-Devel/1.00/branches/helper_refactor/t/render_file_contents.t
===================================================================
--- Catalyst-Devel/1.00/branches/helper_refactor/t/render_file_contents.t 2009-11-27 01:44:43 UTC (rev 12052)
+++ Catalyst-Devel/1.00/branches/helper_refactor/t/render_file_contents.t 2009-11-27 02:07:28 UTC (rev 12053)
@@ -15,6 +15,7 @@
ok( $helper->render_file_contents('example1', $fn, { test_var => 'test_val' }), "file contents rendered" );
ok -r $fn;
+ok -s $fn;
unlink $fn;
done_testing;
Modified: 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 2009-11-27 01:44:43 UTC (rev 12052)
+++ Catalyst-Devel/1.00/branches/helper_refactor/t/render_share_dir_file.t 2009-11-27 02:07:28 UTC (rev 12053)
@@ -14,6 +14,7 @@
ok( $helper->render_sharedir_file('script/myapp_cgi.pl.tt', $fn, { appprefix => 'fnargh' }), "sharedir file rendered" );
ok -r $fn;
+ok -s $fn;
unlink $fn;
done_testing;
More information about the Catalyst-commits
mailing list