Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
first-code-block now always returns the 1st block.
Before it returned the second because it was only checking
2nd position.
  • Loading branch information
coke committed Oct 8, 2015
1 parent 7df7c77 commit f9d2442
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions t/pod-convenience.t
Expand Up @@ -6,7 +6,6 @@ use Pod::Convenience;
plan 10;

subtest {
plan 4;
eval-dies-ok('use Pod::Convenience; first-code-block();', "pod argument required");
eval-dies-ok('use Pod::Convenience; first-code-block("moo");', "array argument required");

Expand All @@ -16,8 +15,7 @@ subtest {
@code-blocks.push(Pod::Block::Code.new(contents => ['my $first-block']));
@code-blocks.push(Pod::Block::Code.new(contents => ['my @second-block']));

# XXX: why does this return the *second* block??
is(first-code-block(@code-blocks), 'my @second-block', "first code block returned");
is(first-code-block(@code-blocks), 'my $first-block', "first code block returned");
}, "first-code-block";

subtest {
Expand Down

0 comments on commit f9d2442

Please sign in to comment.