in reply to Failing test in the Dancer application
From the CPAN link you provided, under EXPORTS ... :syntax, you'll see: "This tells Dancer to just export symbols and not set up your app. ..."
Follow the Source link (at the top of that page) and take a look at the sub import { ... } code. You'll note an early return if you've used :syntax:
# if :syntax option exists, don't change settings return if $syntax_only;
If you don't use :syntax, the remaining lines of code will be processed:
$as_script = 1 if $ENV{PLACK_ENV}; Dancer::GetOpt->process_args() if !$as_script; _init_script_dir($script); Dancer::Config->load;
I expect one or more of these will be causing your test to fail. I say expect because I haven't seen the code for MyApp.pm and 002_index_route.t.
-- Ken
|
|---|