updated generated app
[catagits/Catalyst-Devel.git] / t / generated_app.t
CommitLineData
ad9d93fc 1use strict;
2use warnings;
3
4use File::Temp qw/ tempdir /;
0f89baa1 5use File::Spec;
ad9d93fc 6my $dir = tempdir(); # CLEANUP => 1 );
7
8use Test::More;
9{
10 # Check exit status here
11 system("cd $dir; catalyst.pl TestApp");
12}
13# Fix paths / nl work on win32
14chdir("$dir/TestApp/");
15warn($dir);
16
17# Ok, this is lame.. Also, check +x permissions?
18my @files = qw|
19 Makefile.PL
2cb998f9 20 testapp.conf
21lib/TestApp.pm
22lib/TestApp/Controller/Root.pm
23README
24Changes
25t/01app.t
26t/02pod.t
27t/03podcoverage.t
28root/static/images/catalyst_logo.png
29root/static/images/btn_120x50_built.png
30root/static/images/btn_120x50_built_shadow.png
31root/static/images/btn_120x50_powered.png
32root/static/images/btn_120x50_powered_shadow.png
33root/static/images/btn_88x31_built.png
34root/static/images/btn_88x31_built_shadow.png
35root/static/images/btn_88x31_powered.png
36root/static/images/btn_88x31_powered_shadow.png
37root/favicon.ico
38Makefile.PL
39script/testapp_cgi.pl
40script/testapp_fastcgi.pl
41script/testapp_server.pl
42script/testapp_test.pl
43script/testapp_create.pl
ad9d93fc 44|;
45
20859489 46plan 'tests' => scalar @files + 3;
ad9d93fc 47
48foreach my $fn (@files) {
49 ok -r $fn, "Have $fn in generated app";
50}
51
20859489 52## Makefile stuff
53my $makefile_status = `$^X Makefile.PL`;
54ok $makefile_status, "Makefile ran okay";
55ok -e "Makefile", "Makefile exists";
56my $newapp_test_status = `prove -l t/`;
57ok $newapp_test_status, "Tests ran okay";
58#is $newapp_test_status, ;
59
0f89baa1 60## Moosey server tests
61my $server_path = File::Spec->catfile('script', 'testapp_server.pl');
62#my $server_status = `$^X $server_path`;
63#ok $server_status, "Moosey server starts ok";
64