[Jifty-commit] r2109 - in jifty/trunk: examples/Chat/t
jifty-commit at lists.jifty.org
jifty-commit at lists.jifty.org
Fri Nov 3 18:16:24 EST 2006
Author: schwern
Date: Fri Nov 3 18:16:22 2006
New Revision: 2109
Added:
jifty/trunk/examples/Chat/t/00compile.t
jifty/trunk/examples/Chat/t/01startup.t
Modified:
jifty/trunk/ (props changed)
Log:
r25095 at windhund: schwern | 2006-11-02 18:26:08 -0500
Basic compile and startup tests.
Added: jifty/trunk/examples/Chat/t/00compile.t
==============================================================================
--- (empty file)
+++ jifty/trunk/examples/Chat/t/00compile.t Fri Nov 3 18:16:22 2006
@@ -0,0 +1,19 @@
+#!/usr/bin/perl -w
+
+use Test::More;
+
+use File::Find;
+
+my @modules;
+find sub {
+ return unless /\.pm$/;
+ push @modules, $File::Find::name;
+}, "lib";
+
+ at modules = map { s[^lib/][]; $_ =~ s[.pm$][]; $_ =~ s[/][::]g; $_ } @modules;
+
+plan tests => scalar @modules;
+
+for my $module (@modules) {
+ require_ok $module;
+}
Added: jifty/trunk/examples/Chat/t/01startup.t
==============================================================================
--- (empty file)
+++ jifty/trunk/examples/Chat/t/01startup.t Fri Nov 3 18:16:22 2006
@@ -0,0 +1,13 @@
+#!/usr/bin/perl -w
+
+use Jifty::Test 'no_plan';
+use Jifty::Test::WWW::Mechanize;
+
+# Startup the server.
+my $server = Jifty::Test->make_server;
+isa_ok($server, 'Jifty::Server');
+
+my $URL = $server->started_ok;
+my $mech = Jifty::Test::WWW::Mechanize->new;
+
+$mech->get_ok("$URL", "got the front page");
More information about the Jifty-commit
mailing list