Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get FeatureRunner & ScenarioRunner ready for randomization #198

Merged
merged 20 commits into from
Jun 29, 2017

Conversation

yarmiganosca
Copy link
Contributor

@yarmiganosca yarmiganosca commented Jun 26, 2017

This is the second step of the refactor discussed in #196.

In order to easily and cleanly apply seeded randomization to both Features and Scenarios, we have to know which Features and Scenarios are going to get run before we start iteration.
The 2 big changes are:

  • in FeatureRunner#run, instead of directly iterating over the filenames array, we use it to determine a features array and iterate over that.
  • in ScenarioRunner#run_scenarios!, instead of asking each Scenario is we should run it during iteration, we iterate over the array return by the scenarios_to_run private method.

These changes provide us with a seam in each Runner where we can manipulate the order of their respective "runnables".
One small change that supports this:

  • a Scenario now knows every line that it takes up in it's file, instead of just the one it starts on.

@mention-bot
Copy link

@yarmiganosca, thanks for your PR! By analyzing the history of the files in this pull request, we identified @txus, @josepjaume and @divins to be potential reviewers.

@coveralls
Copy link

coveralls commented Jun 26, 2017

Coverage Status

Coverage decreased (-0.1%) to 90.909% when pulling b04e702 on yarmiganosca:drive-runners-with-arrays into 9ad6157 on codegram:master.

Copy link
Member

@oriolgual oriolgual left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!!

@oriolgual oriolgual merged commit 07290c4 into codegram:master Jun 29, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants