[Catalyst-commits] r6780 - in trunk/Catalyst-View-Mason/t: .
lib/TestApp/root
rafl at dev.catalyst.perl.org
rafl at dev.catalyst.perl.org
Tue Aug 28 17:01:06 GMT 2007
Author: rafl
Date: 2007-08-28 17:01:06 +0100 (Tue, 28 Aug 2007)
New Revision: 6780
Modified:
trunk/Catalyst-View-Mason/t/globals.t
trunk/Catalyst-View-Mason/t/lib/TestApp/root/additional_globals
Log:
Test default globals when additional globals are configured.
Modified: trunk/Catalyst-View-Mason/t/globals.t
===================================================================
--- trunk/Catalyst-View-Mason/t/globals.t 2007-08-28 16:00:55 UTC (rev 6779)
+++ trunk/Catalyst-View-Mason/t/globals.t 2007-08-28 16:01:06 UTC (rev 6780)
@@ -2,7 +2,7 @@
use strict;
use warnings;
-use Test::More tests => 8;
+use Test::More tests => 11;
use FindBin;
use lib "$FindBin::Bin/lib";
@@ -19,5 +19,8 @@
$response = request('/additional_globals');
ok($response->is_success, 'request ok');
-like($response->content, qr{\b foo \s+ => \s+ 123 \b}x, 'global foo');
-like($response->content, qr{\b bar \s+ => \s+ \[moo, \s+ kooh\] }x, 'global bar');
+like($response->content, qr{\b c \s+ => \s+ TestApp \b}x, 'global c');
+like($response->content, qr{\b base \s+ => \s+ http:// \b}x, 'global base');
+like($response->content, qr{\b name \s+ => \s+ TestApp \b}x, 'global name');
+like($response->content, qr{\b foo \s+ => \s+ 123 \b}x, 'global foo');
+like($response->content, qr{\b bar \s+ => \s+ \[moo, \s+ kooh\] }x, 'global bar');
Modified: trunk/Catalyst-View-Mason/t/lib/TestApp/root/additional_globals
===================================================================
--- trunk/Catalyst-View-Mason/t/lib/TestApp/root/additional_globals 2007-08-28 16:00:55 UTC (rev 6779)
+++ trunk/Catalyst-View-Mason/t/lib/TestApp/root/additional_globals 2007-08-28 16:01:06 UTC (rev 6780)
@@ -3,6 +3,8 @@
@bar = qw/moo kooh/;
</%init>
+<& /globals &>
+
{
foo => <% $foo %>,
bar => [<% join (q/, /, @bar) %>],
More information about the Catalyst-commits
mailing list