diff options
Diffstat (limited to 't/02-app.t')
-rw-r--r-- | t/02-app.t | 28 |
1 files changed, 10 insertions, 18 deletions
diff --git a/t/02-app.t b/t/02-app.t index 40d0d27..737008e 100644 --- a/t/02-app.t +++ b/t/02-app.t @@ -1,20 +1,12 @@ use strict; use warnings; -use Test::More import => ["!pass"]; - -use Dancer ':syntax'; -use Dancer::Test; - -plan tests => 3; - -setting views => 't'; -setting template => 'xslate'; - -ok( - get '/' => sub { - template 'index', { loop => [1..2] }; - } -); - -route_exists [ GET => '/' ]; -response_content_like( [ GET => '/' ], qr/1<br \/>\n2/ ); +use Test::More tests => 2; +use File::Spec; + +{ + use Dancer::Test; + use lib File::Spec->catdir(qw(t lib)); + use TestApp; + route_exists [ GET => '/' ]; + response_content_like( [ GET => '/' ], qr/1<br \/>\n2/ ); +} |