Class: CukeIterations::ScenarioListGenerator
- Inherits:
-
Object
- Object
- CukeIterations::ScenarioListGenerator
- Defined in:
- lib/cuke_iterations/scenario_list_generator.rb
Class Method Summary collapse
- .for_iteration(scenarios, iteration_info) ⇒ Object
- .is_excluded?(scenario, iteration) ⇒ Boolean
- .is_included_by_tag?(scenario, iteration) ⇒ Boolean
- .no_include_tags_specified?(iteration) ⇒ Boolean
Class Method Details
.for_iteration(scenarios, iteration_info) ⇒ Object
4 5 6 7 8 9 |
# File 'lib/cuke_iterations/scenario_list_generator.rb', line 4 def for_iteration(scenarios, iteration_info) scenarios.select do |s| next if is_excluded?(s, iteration_info) is_included_by_tag?(s, iteration_info) || (iteration_info) end end |
.is_excluded?(scenario, iteration) ⇒ Boolean
19 20 21 |
# File 'lib/cuke_iterations/scenario_list_generator.rb', line 19 def is_excluded?(scenario, iteration) (scenario[:tags] & iteration[:exclude_tags]).any? end |
.is_included_by_tag?(scenario, iteration) ⇒ Boolean
15 16 17 |
# File 'lib/cuke_iterations/scenario_list_generator.rb', line 15 def is_included_by_tag?(scenario, iteration) (scenario[:tags] & iteration[:include_tags]).any? end |
.no_include_tags_specified?(iteration) ⇒ Boolean
11 12 13 |
# File 'lib/cuke_iterations/scenario_list_generator.rb', line 11 def (iteration) iteration[:include_tags] == [] end |