diff _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
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/_test/Test/Web/View.pm	Wed Mar 28 17:28:51 2012 +0400
@@ -0,0 +1,32 @@
+package Test::Web::View;
+use strict;
+use warnings;
+
+use parent qw(IMPL::Test::Unit);
+__PACKAGE__->PassThroughArgs;
+
+use IMPL::Test qw(assert test);
+use IMPL::Web::View::TTLoader();
+
+use constant {
+	TTLoader => typeof IMPL::Web::View::TTLoader
+};
+
+test TemplateLoaderTests => sub {
+	my ($this) = @_;
+	
+	my $loader = TTLoader->new(
+		{
+			INCLUDE_PATH => [
+				$this->GetResourceDir('Resources')
+			]
+		},
+		ext => '.tt'
+	);
+	
+	assert( defined(my $tt = $loader->template('simple') ) );
+	
+	$tt;	
+};
+
+1;
\ No newline at end of file