Browse files

Make TB2::History->in_test and done_testing always return a boolean

This is important when as_hash is added to TB2::History so in_test
and done_testing are always defined and thus always dumped.
  • Loading branch information...
1 parent 53021f9 commit 9e5ed1ad575ae2ec6b84a5451e4b4903255d081f @schwern schwern committed Apr 24, 2013
Showing with 4 additions and 2 deletions.
  1. +4 −2 lib/TB2/History.pm
View
6 lib/TB2/History.pm
@@ -480,7 +480,8 @@ sub in_test {
my $self = shift;
return 0 if $self->abort;
- return $self->test_start && !$self->test_end;
+ return 1 if $self->test_start && !$self->test_end;
+ return 0;
}
@@ -497,7 +498,8 @@ sub done_testing {
my $self = shift;
return 0 if $self->abort;
- return $self->test_start && $self->test_end;
+ return 1 if $self->test_start && $self->test_end;
+ return 0;
}

0 comments on commit 9e5ed1a

Please sign in to comment.