Skip to content

Commit

Permalink
Use perl test-config file to avoid test failures due to missing yaml …
Browse files Browse the repository at this point in the history
…parser
  • Loading branch information
maros committed Apr 9, 2012
1 parent 9caed85 commit ad1ccd8
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 10 deletions.
8 changes: 4 additions & 4 deletions t/04_plugin_config.t
Expand Up @@ -12,7 +12,7 @@ use Test01;

{
explain('Test 1: Command with config');
local @ARGV = qw(command_a --config t/config.yml);
local @ARGV = qw(command_a --config t/config.pl);
my $test01 = Test01->new_with_command;
isa_ok($test01,'Test01::CommandA');

Expand All @@ -24,15 +24,15 @@ use Test01;

{
explain('Test 2: Another command with config');
local @ARGV = qw(command_b --config t/config.yml);
local @ARGV = qw(command_b --config t/config.pl);
my $test01 = Test01->new_with_command;
isa_ok($test01,'Test01::CommandB');
is($test01->global,'123','Arg from command config');
}

{
explain('Test 3: Command with config and argv');
local @ARGV = qw(command_a --config t/config.yml --global 1234);
local @ARGV = qw(command_a --config t/config.pl --global 1234);
my $test01 = Test01->new_with_command;
isa_ok($test01,'Test01::CommandA');
is($test01->global,'1234','Arg from command config');
Expand All @@ -41,7 +41,7 @@ use Test01;

{
explain('Test 4: Missing config');
local @ARGV = qw(command_a --config t/nosuchfile.yml --global 1234);
local @ARGV = qw(command_a --config t/nosuchfile.pl --global 1234);
my $test01 = Test01->new_with_command;
isa_ok($test01,'MooseX::App::Message::Envelope');
like($test01->blocks->[0]->header,qr/Could not find/,'Error message set');
Expand Down
9 changes: 9 additions & 0 deletions t/config.pl
@@ -0,0 +1,9 @@
{
global => {
global => 123,
},
command_a => {
global => 234,
commanda_loca1 => 22,
},
}
6 changes: 0 additions & 6 deletions t/config.yml

This file was deleted.

0 comments on commit ad1ccd8

Please sign in to comment.