jwilger-cucumber 0.3.11.200906161550 → 0.3.11.200907091518
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/cucumber/filter.rb +2 -2
- data/lib/cucumber/parser/feature.rb +27 -0
- data/lib/cucumber/version.rb +1 -1
- metadata +2 -2
data/lib/cucumber/filter.rb
CHANGED
@@ -32,7 +32,7 @@ module Cucumber
|
|
32
32
|
end
|
33
33
|
|
34
34
|
def included_by_tags?(syntax_node)
|
35
|
-
@include_tags.empty? || syntax_node.
|
35
|
+
@include_tags.empty? || syntax_node.has_all_tags?(@include_tags)
|
36
36
|
end
|
37
37
|
|
38
38
|
def excluded_by_tags?(syntax_node)
|
@@ -47,4 +47,4 @@ module Cucumber
|
|
47
47
|
@name_regexps.nil? || @name_regexps.empty? || @name_regexps.detect{|name_regexp| syntax_node.matches_name?(name_regexp)}
|
48
48
|
end
|
49
49
|
end
|
50
|
-
end
|
50
|
+
end
|
@@ -55,6 +55,10 @@ module Cucumber
|
|
55
55
|
def has_tags?(tag_names)
|
56
56
|
tags.has_tags?(tag_names)
|
57
57
|
end
|
58
|
+
|
59
|
+
def has_all_tags?(tag_names)
|
60
|
+
tags.has_all_tags?(tag_names)
|
61
|
+
end
|
58
62
|
|
59
63
|
def build(filter)
|
60
64
|
if(filter.nil? || feature_elements.accept?(filter) || (!bg.empty? && filter.accept?(bg)))
|
@@ -211,6 +215,10 @@ module Cucumber
|
|
211
215
|
ts.elements.detect{|e| e.tag.line == line}
|
212
216
|
end
|
213
217
|
|
218
|
+
def has_all_tags?(tags)
|
219
|
+
(tags & tag_names) == tags
|
220
|
+
end
|
221
|
+
|
214
222
|
def has_tags?(tags)
|
215
223
|
(tag_names & tags).any?
|
216
224
|
end
|
@@ -491,6 +499,11 @@ module Cucumber
|
|
491
499
|
feature_tags.has_tags?(tag_names)
|
492
500
|
end
|
493
501
|
|
502
|
+
def has_all_tags?(tag_names)
|
503
|
+
feature_tags = self.parent.tags
|
504
|
+
feature_tags.has_all_tags?(tag_names)
|
505
|
+
end
|
506
|
+
|
494
507
|
def build
|
495
508
|
Ast::Background.new(
|
496
509
|
comment.build,
|
@@ -688,6 +701,11 @@ module Cucumber
|
|
688
701
|
tags.has_tags?(tag_names) || feature_tags.has_tags?(tag_names)
|
689
702
|
end
|
690
703
|
|
704
|
+
def has_all_tags?(tag_names)
|
705
|
+
feature_tags = self.parent.parent.tags
|
706
|
+
tags.has_all_tags?(tag_names) || feature_tags.has_all_tags?(tag_names)
|
707
|
+
end
|
708
|
+
|
691
709
|
def matches_name?(regexp_to_match)
|
692
710
|
name.build =~ regexp_to_match
|
693
711
|
end
|
@@ -826,6 +844,11 @@ module Cucumber
|
|
826
844
|
tags.has_tags?(tag_names) || feature_tags.has_tags?(tag_names)
|
827
845
|
end
|
828
846
|
|
847
|
+
def has_all_tags?(tag_names)
|
848
|
+
feature_tags = self.parent.parent.tags
|
849
|
+
tags.has_all_tags?(tag_names) || feature_tags.has_all_tags?(tag_names)
|
850
|
+
end
|
851
|
+
|
829
852
|
def matches_name?(regexp_to_match)
|
830
853
|
outline_matches_name?(regexp_to_match) || examples_sections.matches_name?(regexp_to_match)
|
831
854
|
end
|
@@ -1162,6 +1185,10 @@ module Cucumber
|
|
1162
1185
|
true
|
1163
1186
|
end
|
1164
1187
|
|
1188
|
+
def has_all_tags?(tag_names)
|
1189
|
+
true
|
1190
|
+
end
|
1191
|
+
|
1165
1192
|
def outline_at_line?(line)
|
1166
1193
|
true
|
1167
1194
|
end
|
data/lib/cucumber/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jwilger-cucumber
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.11.
|
4
|
+
version: 0.3.11.200907091518
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- "Aslak Helles\xC3\xB8y"
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-
|
12
|
+
date: 2009-07-09 00:00:00 -07:00
|
13
13
|
default_executable: cucumber
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|