@@ -11,7 +11,7 @@ def by_steps(tests, num_groups, options)
1111
1212 def by_scenarios ( tests , num_groups , options = { } )
1313 scenarios = group_by_scenarios ( tests , options )
14- in_even_groups_by_size ( scenarios , num_groups , options . slice ( BY_SCENARIOS_SUPPORTED_OPTIONS ) )
14+ in_even_groups_by_size ( scenarios , num_groups , options . slice ( * BY_SCENARIOS_SUPPORTED_OPTIONS ) )
1515 end
1616
1717 def in_even_groups_by_size ( items , num_groups , options = { } )
@@ -128,14 +128,15 @@ def group_by_scenarios(tests, options = {})
128128 end
129129
130130 def separate_single_items ( items , options )
131- items . partition { |item , _size | to_single_items? ( item , options ) }
131+ items . partition { |item | to_single_items? ( item , options ) }
132132 end
133133
134134 def to_single_items? ( item , options )
135135 if options [ :single_process ]
136+ item = item_with_tags? ( item ) || item_with_size? ( item ) ? item [ 0 ] : item
136137 options [ :single_process ] . any? { |pattern | item =~ pattern }
137138 elsif options [ :single_process_tag ]
138- raise "--single-tag option can be used only with '--group-by scenarios'" unless item_with_tags? ( item )
139+ raise "--single-tag option can only be used with '--group-by scenarios'" unless item_with_tags? ( item )
139140 item_tags = item [ 1 ]
140141 item_tags . any? { |tag | tag . match? ( options [ :single_process_tag ] ) }
141142 else
0 commit comments