G'day, I asked this on IRC, but I've not seen a response yet:
If we have a very simple Dancer 2 application, consisting of the
single route:
get '/' => sub {
"test reference 1";
};
If, then, Dancer2::Test is set up (in a separate package) and we call
`response_content_is`
response_content_is ([GET => '/'], "test reference 1");
the test does not pass: it _always_ fails, for reasons I don't quite
grasp.
If I turn on `DANCER_DEBUG_CORE` in the environment, it's obvious
that the app is being configured correctly, and in fact, if we were to
simply tell the application to dance, it would.
This suggests, to me, that the bug is somewhere in Dancer2::Core. But I
have no idea what the flow of routes and requests is, so I cannot (yet)
suggest a solution.
In the meantime, it looks suspiciously like Dancer2::Test is broken. I
ran the Dancer2 test suite, which includes tests for Dancer2::Test, and,
while it doesn't find any errors, I'm not convinced that the test code
tests Dancer2::Test correctly.
I'm not entirely sure how to proceed from here. Certainly, I'd like to
know why `response_content_is` isn't actually handling responses
correctly except in the test suite code, which suggests that it's a
property of the way the routes are constructed in the test code -- and
that really isn't helpful.
I've got the full code and essentially all of these notes up on Github
at https://gist.github.com/Jashank/5140883
Cheers,
Jashank
--
Jashank Jeremy
PGP: 0x25A5C309
pgpXLoORj3RVH.pgp
Description: PGP signature
_______________________________________________ dancer-users mailing list [email protected] http://lists.preshweb.co.uk/mailman/listinfo/dancer-users
