Skip to content

Commit

Permalink
Add --single-process-tag option to run specific Cucumber/Gherkin scen…
Browse files Browse the repository at this point in the history
…arios sequentially
  • Loading branch information
andrii-rymar committed Apr 14, 2021
1 parent a5a01bd commit 339e4ed
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/parallel_tests/grouper.rb
Expand Up @@ -11,7 +11,7 @@ def by_steps(tests, num_groups, options)

def by_scenarios(tests, num_groups, options = {})
scenarios = group_by_scenarios(tests, options)
in_even_groups_by_size(scenarios, num_groups, options.slice(BY_SCENARIOS_SUPPORTED_OPTIONS))
in_even_groups_by_size(scenarios, num_groups, options.slice(*BY_SCENARIOS_SUPPORTED_OPTIONS))
end

def in_even_groups_by_size(items, num_groups, options = {})
Expand Down Expand Up @@ -135,7 +135,7 @@ def to_single_items?(item, options)
if options[:single_process]
options[:single_process].any? { |pattern| item =~ pattern }
elsif options[:single_process_tag]
raise "--single-tag option can be used only with '--group-by scenarios'" unless item_with_tags?(item)
raise "--single-tag option can only be used with '--group-by scenarios'" unless item_with_tags?(item)
item_tags = item[1]
item_tags.any? { |tag| tag.match?(options[:single_process_tag]) }
else
Expand Down

0 comments on commit 339e4ed

Please sign in to comment.