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.