Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Dancer2::Test Bug #488

Closed
andrewsolomon opened this Issue Oct 6, 2013 · 1 comment

Comments

Projects
None yet
2 participants
Contributor

andrewsolomon commented Oct 6, 2013

Dancer2::Test needs a bin directory for no apparent reason. Here's how to replicate the bug using the dancer2 framework template:

  1. Dancer2::Test is happy with the standard framework
$ dancer2 -a TestPass1
$ cd TestPass1/
$ prove -lv t/002_index_route.t
  1. Dancer2::Test is still happy if you move the app.pl into the root directory
$ dancer2 -a TestPass2
$ cd TestPass2
$ mv bin/app.pl .
$ prove -lv t/002_index_route.t
  1. Dancer2::Test fails if you remove the empty bin directory
$ dancer2 -a TestFail
$ cd TestFail
$ mv bin/app.pl .
$ rmdir bin
$ prove -lv t/002_index_route.t
$ prove -lv t/002_index_route.t
t/002_index_route.t .. 
1..2
[TestFail:5703] error @2013-10-06 10:24:11> Route exception: /mnt/data-store/student/perl-web-dev/topic-05/tmp/TestFail/lib/views/index.tt is not a regular file or reference at /usr/local/share/perl/5.14.2/Dancer2/Core/Role/Template.pm line 105. in (eval 77) l. 2
not ok 1 - a route handler is defined for /

#   Failed test 'a route handler is defined for /'
#   at t/002_index_route.t line 9.
#          got: '500'
#     expected: '200'
...
Owner

xsawyerx commented May 20, 2014

Dancer2::Test is being deprecated. Please use Plack::Test.

If you have any questions on how to write a testing using it, please let us know. You can also view the entire Dancer 2 testing suite, which had been moved to it as well.

Hope you don't mind me closing it, in light of this.

@xsawyerx xsawyerx closed this May 20, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment