Skip to content

Commit

Permalink
Close pherkin#98: Rename 'outline_stash' to 'outline_state'
Browse files Browse the repository at this point in the history
  • Loading branch information
ehuelsmann committed Sep 6, 2016
1 parent 65148ab commit c3cf72e
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions lib/Test/BDD/Cucumber/Executor.pm
Original file line number Diff line number Diff line change
Expand Up @@ -215,10 +215,10 @@ the Harness interface.
sub execute_scenario {
my ( $self, $options ) = @_;
my ( $feature, $feature_stash, $harness, $outline, $background_obj,
$incoming_scenario_stash, $incoming_outline_stash )
$incoming_scenario_stash, $incoming_outline_state )
= @$options{
qw/ feature feature_stash harness scenario background scenario_stash
outline_stash
outline_state
/
};

Expand All @@ -227,8 +227,8 @@ sub execute_scenario {
my $harness_start = $is_background ? 'background' : 'scenario';
my $harness_stop = $is_background ? 'background_done' : 'scenario_done';

my $outline_stash = $incoming_outline_stash || {};
$outline_stash->{'short_circuit'} ||= $self->_bail_out;
my $outline_state = $incoming_outline_state || {};
$outline_state->{'short_circuit'} ||= $self->_bail_out;

# Multiply out Scenario Outlines as appropriate
my @datasets = @{ $outline->data };
Expand Down Expand Up @@ -276,11 +276,11 @@ sub execute_scenario {

my $result =
$self->dispatch( $context, $before_step,
$outline_stash->{'short_circuit'}, 0 );
$outline_state->{'short_circuit'}, 0 );

# If it didn't pass, short-circuit the rest
unless ( $result->result eq 'passing' ) {
$outline_stash->{'short_circuit'} = 1;
$outline_state->{'short_circuit'} = 1;
}
}
}
Expand All @@ -296,7 +296,7 @@ sub execute_scenario {
feature_stash => $feature_stash,
harness => $harness,
scenario_stash => $scenario_stash,
outline_stash => $outline_stash
outline_state => $outline_state
}
);
}
Expand Down Expand Up @@ -331,11 +331,11 @@ sub execute_scenario {

my $result =
$self->find_and_dispatch( $context,
$outline_stash->{'short_circuit'}, 0 );
$outline_state->{'short_circuit'}, 0 );

# If it didn't pass, short-circuit the rest
unless ( $result->result eq 'passing' ) {
$outline_stash->{'short_circuit'}++;
$outline_state->{'short_circuit'}++;
}

}
Expand All @@ -351,7 +351,7 @@ sub execute_scenario {
my $result = $self->dispatch( $context, $after_step, 0, 0 );
}
$_->post_scenario( $outline, $feature_stash, $scenario_stash,
$outline_stash->{'short_circuit'} )
$outline_state->{'short_circuit'} )
for reverse @{ $self->extensions };

}
Expand Down

0 comments on commit c3cf72e

Please sign in to comment.