From: David E. Wheeler Date: Wed, 2 Sep 2009 22:59:08 +0000 (+0000) Subject: Added a test for direct rendering of a template from a view object, without a X-Git-Tag: v0.30~2 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-View-TT.git;a=commitdiff_plain;h=9164484f147f426a4a5c06477aec05ecc86d8c38 Added a test for direct rendering of a template from a view object, without a request. --- diff --git a/Changes b/Changes index c99f0b7..f6fafb0 100644 --- a/Changes +++ b/Changes @@ -9,6 +9,8 @@ Revision history for Perl extension Catalyst::View::TT. (Gunnar Strand) - "use warnings" in Catalyst::View::TT and output from the TT helper - Expand TTSite documentation (RT #33838) + - Added a test for direct rendering of a template from a view object, + without a request. 0.29 2009-02-20 14:43:00 - Remove extra unwanted .gitignore from manifest diff --git a/t/11norequest.t b/t/11norequest.t new file mode 100644 index 0000000..9a562b0 --- /dev/null +++ b/t/11norequest.t @@ -0,0 +1,13 @@ +use strict; +use warnings; +use Test::More tests => 4; + +use FindBin; +use lib "$FindBin::Bin/lib"; + +BEGIN { use_ok 'TestApp' or die } + +ok my $c = TestApp->new, 'Instantiate app object'; +ok my $tt = $c->view('TT'), 'Get TT view object'; +is $tt->render($c, 'test.tt', { message => 'hello' }), 'hello', + 'render() should return the template output';