lib/parallel_tests/cucumber/scenarios.rb in parallel_tests-0.16.10 vs lib/parallel_tests/cucumber/scenarios.rb in parallel_tests-0.16.11

- old
+ new

@@ -7,15 +7,13 @@ module ParallelTests module Cucumber class Scenarios class << self def all(files, options={}) - tag_expressions = if options[:ignore_tag_pattern] - options[:ignore_tag_pattern].split(/\s*,\s*/).map {|tag| "~#{tag}" } - else - [] - end - split_into_scenarios files, tag_expressions + tags = [] + tags.concat options[:ignore_tag_pattern].to_s.split(/\s*,\s*/).map {|tag| "~#{tag}" } + tags.concat options[:test_options].to_s.scan(/(?:-t|--tags) (@\w+)/).flatten + split_into_scenarios files, tags.uniq end private def split_into_scenarios(files, tags=[])