Created
July 25, 2011 22:34
-
-
Save polettix/1105421 to your computer and use it in GitHub Desktop.
bug in Dancer's view w/ Template::Toolkit
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<% who %> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use strict; | |
use warnings; | |
use Test::More import => ['!pass'], 'no_plan'; | |
use Dancer ':syntax'; | |
use Dancer::Test; | |
setting template => 'template_toolkit'; | |
ok(get('/' => sub { template root => {who => 'root'} }), 'root route'); | |
route_exists [GET => $_] for qw( / ); | |
setting views => path($ENV{PWD}, qw( t views )); | |
response_content_is([GET => '/'], "root\n", 'response for / exists with view with absolute path'); | |
setting views => path(qw( t views )); | |
response_content_is([GET => '/'], "root", 'response for / exists with view with relative path'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Try this:
That would work.