Hey
I looked into it, and apparently Dancer::Test does check for the environment:
in file:
use Dancer::Test;
use Dancer::Config;
print Dancer::Config::setting('mykey'), "\n";
--
If I run it as:
DANCER_ENVIRONMENT=test perl -Ilib file.pl
... it does print the value of the key 'mykey' configured in test.yml inside 'environments'.
So there is no problem there.