Skip to content

Commit

Permalink
Tidied
Browse files Browse the repository at this point in the history
  • Loading branch information
AndyA committed Nov 17, 2009
1 parent bdcf54c commit b258ae1
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 deletions.
2 changes: 1 addition & 1 deletion t/lib/EmptyParser.pm
Expand Up @@ -15,7 +15,7 @@ sub _initialize {
sub _set_defaults {
my $self = shift;

for my $key ( qw( grammar_class result_factory_class ) ) {
for my $key (qw( grammar_class result_factory_class )) {
my $default_method = "_default_$key";
$self->$key( $self->$default_method() );
}
Expand Down
12 changes: 8 additions & 4 deletions t/source.t
Expand Up @@ -30,13 +30,17 @@ use_ok('TAP::Parser::Source');
{
my $source = TAP::Parser::Source->new;
isa_ok( $source, 'TAP::Parser::Source', 'new source' );
can_ok( $source,
qw( raw meta config merge switches test_args assemble_meta ) );
can_ok(
$source,
qw( raw meta config merge switches test_args assemble_meta )
);

is_deeply( $source->config, {}, 'config empty by default' );
$source->config->{Foo} = { bar => 'baz' };
is_deeply( $source->config_for('Foo'), { bar => 'baz' },
'config_for( Foo )' );
is_deeply(
$source->config_for('Foo'), { bar => 'baz' },
'config_for( Foo )'
);
is_deeply(
$source->config_for('TAP::Parser::SourceHandler::Foo'),
{ bar => 'baz' }, 'config_for( ...::SourceHandler::Foo )'
Expand Down
3 changes: 2 additions & 1 deletion t/source_handler.t
Expand Up @@ -427,7 +427,8 @@ sub test_handler {
my $default_vote = $tests->{default_vote} || 0;
my $source = TAP::Parser::Source->new;
is( $class->can_handle($source), $default_vote,
'... can_handle default vote' );
'... can_handle default vote'
);
}

foreach my $test ( @{ $tests->{can_handle} } ) {
Expand Down

0 comments on commit b258ae1

Please sign in to comment.