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';
-. 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)
use Test::More;
-diag "In $dir";
+diag "Generated app is in $dir";
{
my $exit;
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';
{
}
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';