Hi,
I'm trying to write continuous integration functional tests for one of my
controllers in a full Mojolicious application.
I'm trying to understand what mode (production, development, test) the
application is started with when I do:
sub get_test_app {
my $t = Test::Mojo->new('BrodieFull');
$t->app->mode('test');
$t->app->log->level('debug');
$t->ua->max_redirects(1);
return $t;
}
in my test file.
I suspect it's 'development' but I'd like to make it 'test' so that my
development database is not accidentally removed when I test the
application (which doesn't impress your colleagues very much, or so I hear)
I am using the Mojolicious::Config plugin to specify the database settings
etc. but I can't seem to find a way to get it to read the file
$moniker.test.conf (as in the docs:
http://mojolicio.us/perldoc/Mojolicious/Plugin/Config) whilst functional
testing. As you can see I force the mode but by then the configuration file
has been read and declared missing by the plugin.
I understand I can do something like:
perl -I ./lib brodie_full.pl test t/functional/test_filters_controller.t -m
test
to force test mode but I also need to have the TAP output formatted for the
continuous integration environment in which I use:
prove --timer --formatter TAP::Formatter::JUnit ...
How are other people doing this?
Thanks,
Allan
--
You received this message because you are subscribed to the Google Groups
"Mojolicious" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/mojolicious.
For more options, visit https://groups.google.com/d/optout.