gherkin_lint 0.0.8 → 0.0.9
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 +3 -0
- 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: 11cc0a47c8a7370b13d39e6d4dc5fcaa3b053107
|
4
|
+
data.tar.gz: f6bb350fc776da6541e866596f431335d77421c5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 529b9779a5e7e05269b6bf41dd06a4b8cc47f11f5a175a3d7631fc5b54e8d6346adc7c2e204cdac94a4b0c7a1077408b7fa0329fb8f71bb267a9987f0d0844a5
|
7
|
+
data.tar.gz: 51c2705c48aa1f5b6d0336a3070abeedc7dc0a63273818f47f61c9090a5a635b86dc27342720f26df95e6e3062805f3c733ba3141cc1ebdece99234d317d9516
|
data/lib/gherkin_lint.rb
CHANGED
@@ -566,11 +566,14 @@ class GherkinLint
|
|
566
566
|
def gather_givens(feature)
|
567
567
|
return unless feature.include? 'elements'
|
568
568
|
has_non_given_step = false
|
569
|
+
scenarios = 0
|
569
570
|
feature['elements'].each do |scenario|
|
570
571
|
next unless scenario.include? 'steps'
|
572
|
+
scenarios += 1
|
571
573
|
has_non_given_step = true unless scenario['steps'].first['keyword'] == 'Given '
|
572
574
|
end
|
573
575
|
return if has_non_given_step
|
576
|
+
return if scenarios <= 1
|
574
577
|
|
575
578
|
result = []
|
576
579
|
expanded_steps(feature) { |given| result.push given }
|