Skip to content

Commit

Permalink
test template names
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Jun 11, 2015
1 parent b175311 commit ff76c8d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Changes
@@ -1,5 +1,5 @@

6.12 2015-06-10
6.12 2015-06-11
- Welcome to the Mojolicious core team Dan Book.
- Added TO_JSON method to Mojo::Collection. (wttw)
- Fixed bug in Mojo::Message where multipart content would get downgraded
Expand Down
5 changes: 5 additions & 0 deletions t/mojo/template.t
Expand Up @@ -26,6 +26,11 @@ my $mt = Mojo::Template->new;
my $output = $mt->render('');
is $output, '', 'empty string';

# Named template
$mt = Mojo::Template->new;
$output = $mt->name('foo/bar.mt')->render('<%= __FILE__ %>');
is $output, "foo/bar.mt\n", 'template name';

# Consistent scalar context
$mt->prepend('my @foo = (3, 4);')->parse('<%= @foo %>:<%== @foo %>');
$output = $mt->build->compile || $mt->interpret;
Expand Down

0 comments on commit ff76c8d

Please sign in to comment.