[Dancer-users] How to select a specific environment when I do "make test"
Geistteufel
geistteufel at yahoo.fr
Mon Mar 28 23:17:19 CEST 2011
Everything works if I run bin/app.pl, but no way under test
Could you take a look at there :
https://github.com/geistteufel/Dancer-Plugin-Redis/blob/master/lib/Dancer/Plugin/Redis.pm
I don't get at all what is the problem of this plugin ???
In fact, I have try to Dumper settings, under the "register" function, and surprise : nothing at all.
So Redis take only default params, which is not the test.
plugin_settings seems to give nothing at all.
I do that :
use Dancer;
Dancer::set environment => 'testing';
Dancer::Config->load;
use Dancer::Plugin::Redis;
And die Dumper $settings in the module,
give me
$VAR1 = {}
...
Any idea ?
Le 28 mars 2011 à 13:12, sawyer x a écrit :
> 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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.backup-manager.org/pipermail/dancer-users/attachments/20110328/32614369/attachment.htm>
More information about the Dancer-users
mailing list