[dancer-users] Dancer2::Test appears to misbehave
Russell Jenkins
russell.jenkins at strategicdata.com.au
Tue Mar 12 13:07:14 GMT 2013
On 12/03/13 10:19 PM, Jashank Jeremy wrote:
> 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.
When Dancer2::Test is imported, it expects an arrayref of app names.
i.e.
use Dancer2::Test apps => ['TestApp'];
Otherwise it falls back to the caller as the only app to be tested.
HTH,
Russell.
--
Russell Jenkins ("veryrusty")
More information about the dancer-users
mailing list