[Jifty-commit] r6295 - in jifty/trunk/t/TestApp-Mason: bin etc share share/web share/web/templates t
Jifty commits
jifty-commit at lists.jifty.org
Tue Feb 3 21:15:36 EST 2009
Author: sunnavy
Date: Tue Feb 3 21:15:35 2009
New Revision: 6295
Added:
jifty/trunk/t/TestApp-Mason/
jifty/trunk/t/TestApp-Mason/bin/
jifty/trunk/t/TestApp-Mason/bin/jifty
jifty/trunk/t/TestApp-Mason/etc/
jifty/trunk/t/TestApp-Mason/etc/config.yml
jifty/trunk/t/TestApp-Mason/share/
jifty/trunk/t/TestApp-Mason/share/web/
jifty/trunk/t/TestApp-Mason/share/web/templates/
jifty/trunk/t/TestApp-Mason/share/web/templates/inner
jifty/trunk/t/TestApp-Mason/share/web/templates/outer
jifty/trunk/t/TestApp-Mason/t/
jifty/trunk/t/TestApp-Mason/t/content.t
Log:
added test app for mason
Added: jifty/trunk/t/TestApp-Mason/bin/jifty
==============================================================================
--- (empty file)
+++ jifty/trunk/t/TestApp-Mason/bin/jifty Tue Feb 3 21:15:35 2009
@@ -0,0 +1,11 @@
+#!/usr/bin/env perl
+use warnings;
+use strict;
+use File::Basename qw(dirname);
+use UNIVERSAL::require;
+
+use Jifty;
+use Jifty::Script;
+
+local $SIG{INT} = sub { warn "Stopped\n"; exit; };
+Jifty::Script->dispatch();
Added: jifty/trunk/t/TestApp-Mason/etc/config.yml
==============================================================================
--- (empty file)
+++ jifty/trunk/t/TestApp-Mason/etc/config.yml Tue Feb 3 21:15:35 2009
@@ -0,0 +1,48 @@
+---
+framework:
+ AdminMode: 1
+ ApplicationClass: TestApp::Mason
+ ApplicationName: TestApp-Mason
+ ApplicationUUID: 691A2590-F25E-11DD-9995-406635203BE5
+ ConfigFileVersion: 4
+ Database:
+ AutoUpgrade: 1
+ CheckSchema: 1
+ Database: testapp_mason
+ Driver: SQLite
+ Host: localhost
+ Password: ''
+ RecordBaseClass: Jifty::DBI::Record::Cachable
+ User: ''
+ Version: 0.0.1
+ DevelMode: 1
+ L10N:
+ PoDir: share/po
+ LogLevel: INFO
+ Mailer: Sendmail
+ MailerArgs: []
+
+ Plugins: []
+ PubSub:
+ Backend: Memcached
+ Enable: ~
+ SkipAccessControl: 0
+ TemplateClass: TestApp::Mason::View
+ View:
+ FallbackHandler: Jifty::View::Mason::Handler
+ Handlers:
+ - Jifty::View::Mason::Handler
+ Web:
+ BaseURL: http://localhost
+ DataDir: var/mason
+ Globals: []
+
+ MasonConfig:
+ autoflush: 0
+ default_escape_flags: h
+ error_format: text
+ error_mode: fatal
+ Port: 8888
+ ServeStaticFiles: 1
+ StaticRoot: share/web/static
+ TemplateRoot: share/web/templates
Added: jifty/trunk/t/TestApp-Mason/share/web/templates/inner
==============================================================================
--- (empty file)
+++ jifty/trunk/t/TestApp-Mason/share/web/templates/inner Tue Feb 3 21:15:35 2009
@@ -0,0 +1,4 @@
+start <% $content %> end
+<%init>
+my $content = $m->content;
+</%init>
Added: jifty/trunk/t/TestApp-Mason/share/web/templates/outer
==============================================================================
--- (empty file)
+++ jifty/trunk/t/TestApp-Mason/share/web/templates/outer Tue Feb 3 21:15:35 2009
@@ -0,0 +1 @@
+<&|/inner &>howdy </&>
Added: jifty/trunk/t/TestApp-Mason/t/content.t
==============================================================================
--- (empty file)
+++ jifty/trunk/t/TestApp-Mason/t/content.t Tue Feb 3 21:15:35 2009
@@ -0,0 +1,15 @@
+use strict;
+use warnings;
+
+use Test::More tests => 5;
+use Jifty::Test::Dist;
+use Jifty::Test::WWW::Mechanize;
+
+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 . '/outer');
+
+$mech->content_like( qr{start\s+howdy\s+end} );
+$mech->content_unlike( qr{howdy\s+start\s+end} );
More information about the Jifty-commit
mailing list