Mojolicious-Plugin-INIConfig-Extended
view release on metacpan or search on metacpan
t/ini_config_mode_lite_app.t view on Meta::CPAN
use FindBin;
use lib ("$FindBin::Bin/../lib", "$FindBin::Bin/../local/lib/perl5");
use Mojo::Base -strict;
# Disable IPv6 and libev
BEGIN {
$ENV{MOJO_MODE} = 'testing';
$ENV{MOJO_NO_IPV6} = 1;
$ENV{MOJO_REACTOR} = 'Mojo::Reactor::Poll';
}
use Test::More 'no_plan';
use Mojolicious::Lite;
use Test::Mojo;
# Load plugin
plugin 'INIConfig';
get '/' => 'index';
my $t = Test::Mojo->new;
# Template with config information
$t->get_ok('/')->status_is(200)->content_like(qr/bazfoo/);
__DATA__
@@ index.html.ep
<%= $config->{section}{foo} %><%= $config->{section}{bar} %>
( run in 0.629 second using v1.01-cache-2.11-cpan-d8267643d1d )