Mercurial > pub > Impl
comparison _test/Test/Web/View.pm @ 183:2184fa28b49e
IMPL::Web::View::TTLoader tests
author | cin |
---|---|
date | Wed, 28 Mar 2012 17:28:51 +0400 |
parents | |
children | 7525ea9a071a |
comparison
equal
deleted
inserted
replaced
182:adc7669172c4 | 183:2184fa28b49e |
---|---|
1 package Test::Web::View; | |
2 use strict; | |
3 use warnings; | |
4 | |
5 use parent qw(IMPL::Test::Unit); | |
6 __PACKAGE__->PassThroughArgs; | |
7 | |
8 use IMPL::Test qw(assert test); | |
9 use IMPL::Web::View::TTLoader(); | |
10 | |
11 use constant { | |
12 TTLoader => typeof IMPL::Web::View::TTLoader | |
13 }; | |
14 | |
15 test TemplateLoaderTests => sub { | |
16 my ($this) = @_; | |
17 | |
18 my $loader = TTLoader->new( | |
19 { | |
20 INCLUDE_PATH => [ | |
21 $this->GetResourceDir('Resources') | |
22 ] | |
23 }, | |
24 ext => '.tt' | |
25 ); | |
26 | |
27 assert( defined(my $tt = $loader->template('simple') ) ); | |
28 | |
29 $tt; | |
30 }; | |
31 | |
32 1; |