Skip to content

Commit

Permalink
test MOJO_NO_DETECT environment variable
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Jan 15, 2015
1 parent 13727da commit d22e0ac
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions t/mojolicious/commands.t
Expand Up @@ -37,6 +37,12 @@ my $commands = Mojolicious::Commands->new;
local @ENV{qw(PLACK_ENV PATH_INFO GATEWAY_INTERFACE)};
is $commands->detect, undef, 'no environment';
}
{
local $ENV{PLACK_ENV} = 'production';
is ref Mojolicious::Commands->new->run, 'CODE', 'right reference';
local $ENV{MOJO_NO_DETECT} = 1;
isnt ref Mojolicious::Commands->new->run, 'CODE', 'not a CODE reference';
}

# Run command
is ref Mojolicious::Commands->new->run('psgi'), 'CODE', 'right reference';
Expand Down

0 comments on commit d22e0ac

Please sign in to comment.