Skip to content

Commit

Permalink
Make prove respect environmental variables #28
Browse files Browse the repository at this point in the history
  • Loading branch information
Leont committed Nov 13, 2013
1 parent 21a9df3 commit a8fb517
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 77 deletions.
1 change: 1 addition & 0 deletions Changes
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
Revision history for Test-Harness

- Add harness_class argument to TAP::Harness::Env (Leon Timmermans)
- Make prove respect environmental variables #28 (Leon Timmermans)

3.30 2013-11-12
- Fix missing parent prereq in META.{yml,json} and NotBuild.PL
Expand Down
10 changes: 5 additions & 5 deletions lib/App/Prove.pm
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package App::Prove;
use strict;
use warnings;

use TAP::Harness;
use TAP::Harness::Env;
use Text::ParseWords qw(shellwords);
use File::Spec;
use Getopt::Long;
Expand Down Expand Up @@ -88,7 +88,6 @@ sub _initialize {
for my $key (@is_array) {
$self->{$key} = [];
}
$self->{harness_class} = 'TAP::Harness';

for my $attr (@ATTR) {
if ( exists $args->{$attr} ) {
Expand Down Expand Up @@ -386,8 +385,9 @@ sub _get_args {
}
$args{rules} = { par => [@rules] };
}
$args{harness_class} = $self->{harness_class} if $self->{harness_class};

return ( \%args, $self->{harness_class} );
return \%args;
}

sub _find_module {
Expand Down Expand Up @@ -533,8 +533,8 @@ sub _get_tests {
}

sub _runtests {
my ( $self, $args, $harness_class, @tests ) = @_;
my $harness = $harness_class->new($args);
my ( $self, $args, @tests ) = @_;
my $harness = TAP::Harness::Env->create($args);

my $state = $self->state_manager;

Expand Down
Loading

0 comments on commit a8fb517

Please sign in to comment.