Module: Spinach::TagsMatcher
- Defined in:
- lib/spinach/tags_matcher.rb
Constant Summary collapse
- NEGATION_SIGN =
'~'
Class Method Summary collapse
-
.match(tags) ⇒ Object
Matches an array of tags (e.g. of a scenario) against the tags present in Spinach’ runtime options.
Class Method Details
.match(tags) ⇒ Object
Matches an array of tags (e.g. of a scenario) against the tags present in Spinach’ runtime options.
Spinach’ tag option is an array which consists of (possibly) multiple arrays containing tags provided by the user running the features and scenarios. Each of these arrays is considered a tag group.
When matching tags against the tags groups, the tags inside a tag group are OR-ed and the tag groups themselves are AND-ed.
17 18 19 20 21 22 23 24 |
# File 'lib/spinach/tags_matcher.rb', line 17 def match() return true if tag_groups.empty? tag_groups.all? { |tag_group| res = match_tag_group(Array(tag_group), ) res } end |