gherkin_lint 0.0.6 → 0.0.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/gherkin_lint.rb +2 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e9e8a5aaa0c37236e2c5570757cbd5aeb5436fb0
|
4
|
+
data.tar.gz: 5eb318102e3fbafc07e20be4df639b44a9a93d6b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0eaca00ca42656f88f8a62b4a60a3d2f7b1155c1803ee59dfeaa6b0d9d6f63d508e2fac3ff970b54c4a0ce22ef73a69dc8c44365e6a265c1ab57c772a822eb1a
|
7
|
+
data.tar.gz: 154f3faf5dad974270909cfe7971044543f9ba25d0e1ab44a6ad42a7c58e658ca1a41576e4ad57c82c47910f3aa9a3966b23416e224fd9864075f2628f2a0984
|
data/lib/gherkin_lint.rb
CHANGED
@@ -528,6 +528,7 @@ class GherkinLint
|
|
528
528
|
tags = gather_same_tags feature
|
529
529
|
next if tags.nil?
|
530
530
|
next if tags.length < 1
|
531
|
+
next unless feature['elements'].length > 1
|
531
532
|
references = [reference(file, feature)]
|
532
533
|
tags.each do |tag|
|
533
534
|
add_issue(references, "Tag '#{tag}' should be used at Feature level")
|
@@ -540,7 +541,7 @@ class GherkinLint
|
|
540
541
|
return result unless feature.include? 'elements'
|
541
542
|
feature['elements'].each do |scenario|
|
542
543
|
next if scenario['keyword'] == 'Background'
|
543
|
-
|
544
|
+
return nil unless scenario.include? 'tags'
|
544
545
|
tags = scenario['tags'].map { |tag| tag['name'] }
|
545
546
|
result = tags if result.nil?
|
546
547
|
result &= tags
|