[Catalyst-commits] r6682 - in branches: .
templated_conversion/Catalyst-View-MicroMason/t
templated_conversion/Catalyst-View-MicroMason/t/lib/TestApp/Controller
jrockway at dev.catalyst.perl.org
jrockway at dev.catalyst.perl.org
Fri Aug 17 15:54:11 GMT 2007
Author: jrockway
Date: 2007-08-17 15:54:11 +0100 (Fri, 17 Aug 2007)
New Revision: 6682
Modified:
branches/
branches/templated_conversion/Catalyst-View-MicroMason/t/lib/TestApp/Controller/Root.pm
branches/templated_conversion/Catalyst-View-MicroMason/t/live.t
Log:
r28472 at foo: jon | 2007-08-17 09:18:32 -0500
add test for $c->view->template("bar") syntax
Property changes on: branches
___________________________________________________________________
Name: svk:merge
- d7608cd0-831c-0410-93c0-e5b306c3c028:/local/Catalyst-branches:28461
+ d7608cd0-831c-0410-93c0-e5b306c3c028:/local/Catalyst-branches:28472
Modified: branches/templated_conversion/Catalyst-View-MicroMason/t/lib/TestApp/Controller/Root.pm
===================================================================
--- branches/templated_conversion/Catalyst-View-MicroMason/t/lib/TestApp/Controller/Root.pm 2007-08-17 14:51:44 UTC (rev 6681)
+++ branches/templated_conversion/Catalyst-View-MicroMason/t/lib/TestApp/Controller/Root.pm 2007-08-17 14:54:11 UTC (rev 6682)
@@ -19,4 +19,11 @@
$c->forward('TestApp::View::MicroMason');
}
+sub bar : Global('bar') {
+ my ($self, $c, @args) = @_;
+ $c->view->template('foo');
+ $c->stash->{foo} = 'this is bar';
+ $c->detach('TestApp::View::MicroMason');
+}
+
1;
Modified: branches/templated_conversion/Catalyst-View-MicroMason/t/live.t
===================================================================
--- branches/templated_conversion/Catalyst-View-MicroMason/t/live.t 2007-08-17 14:51:44 UTC (rev 6681)
+++ branches/templated_conversion/Catalyst-View-MicroMason/t/live.t 2007-08-17 14:54:11 UTC (rev 6682)
@@ -5,7 +5,7 @@
use FindBin qw($Bin);
use lib "$Bin/lib";
use Catalyst::Test qw(TestApp);
-use Test::More tests => 4;
+use Test::More tests => 6;
my $test = request('this is handled by default I hope');
ok($test->content, 'content');
@@ -13,3 +13,6 @@
$test = request('/foo');
ok($test->content, 'foo content');
is($test->content, 'foo', 'got expected result');
+$test = request('/bar');
+ok($test->content, 'bar content');
+is($test->content, 'this is bar', 'got expected result');
More information about the Catalyst-commits
mailing list