diff options
author | franck cuny <franck@lumberjaph.net> | 2010-10-08 15:39:16 +0200 |
---|---|---|
committer | franck cuny <franck@lumberjaph.net> | 2010-10-08 15:39:16 +0200 |
commit | f5acb0e9b34ef7ca5aa992fb1406a709ddade3a0 (patch) | |
tree | e301b0a90ccadc6ee4574c47b214d5f364f5f162 | |
parent | add default ext (diff) | |
download | dancer-template-xslate-f5acb0e9b34ef7ca5aa992fb1406a709ddade3a0.tar.gz |
update tests
-rw-r--r-- | t/00-load.t | 3 | ||||
-rw-r--r-- | t/02-app.t | 20 | ||||
-rw-r--r-- | t/index.tx | 3 |
3 files changed, 24 insertions, 2 deletions
diff --git a/t/00-load.t b/t/00-load.t index da6530d..d4ef20b 100644 --- a/t/00-load.t +++ b/t/00-load.t @@ -3,6 +3,5 @@ use warnings; use Test::More tests => 1; BEGIN { - use_ok( 'Dancer::Template::Xslate' ) || print "Bail out! -"; + use_ok( 'Dancer::Template::Xslate' ) || print "Bail out!"; } diff --git a/t/02-app.t b/t/02-app.t new file mode 100644 index 0000000..73e738c --- /dev/null +++ b/t/02-app.t @@ -0,0 +1,20 @@ +use strict; +use warnings; +use Test::More import => ["!pass"]; + +use Dancer ':syntax'; +use Dancer::Test; + +plan tests => 3; + +setting template => 'xslate'; +setting views => 't'; + +ok( + get '/' => sub { + template 'index', { loop => [1..2] }; + } +); + +route_exists [ GET => '/' ]; +response_content_like( [ GET => '/' ], qr/1<br \/>\n2/ ); diff --git a/t/index.tx b/t/index.tx new file mode 100644 index 0000000..8ecc8e1 --- /dev/null +++ b/t/index.tx @@ -0,0 +1,3 @@ +:for $loop -> $i { +<: $i :><br /> +:} |