Skip to content

Instantly share code, notes, and snippets.

@polettix
Created July 25, 2011 22:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save polettix/1105421 to your computer and use it in GitHub Desktop.
Save polettix/1105421 to your computer and use it in GitHub Desktop.
bug in Dancer's view w/ Template::Toolkit
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');
@xsawyerx
Copy link

Try this:

setting views => path( '.', qw<t views> );

That would work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment