alinta-cucumber-rest-bdd 0.5.21 → 0.5.22
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/cucumber-rest-bdd/steps/response.rb +4 -4
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e78ccb9ec136ed4347daaa0afafc066e44beaabd5a19cafbffd54a4e2039507c
|
4
|
+
data.tar.gz: 6f73934f0c2df4bb620d2e09412b1c4cb5e1273aac70d771df1e65e6ac7ca854
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4fa555baada878b6e8480d319a2a26155b802fd38d2a410fe27a271c0a37283c9f5c7bfc51c70f74da909ae2e7cc2fa594467b62ce0818ce28fdccd0bbe6ee32
|
7
|
+
data.tar.gz: 6995a6ebaf778b666dbbd17e4a3a18e16f8fbbbe4d99abf03f1ef0c4e2aba0c76c2f6709de56e8857791efab69f76ae4fe98b1d61d97ba32a3c689d7ebd1306a
|
@@ -45,16 +45,16 @@ Then("the response #{HAVE_ALTERNATION} (the )(following )value {string}") do |va
|
|
45
45
|
raise %/Response did not match: #{expected}\n#{data}/ if data.empty? || !data.include?(expected)
|
46
46
|
end
|
47
47
|
|
48
|
-
Then("{list_has_count} {field_name} #{HAVE_ALTERNATION} (the )(following )(data )attributes:") do |list_comparison,
|
48
|
+
Then("{list_has_count} {field_name} #{HAVE_ALTERNATION} (the )(following )(data )attributes:") do |list_comparison, field, attributes|
|
49
49
|
expected = get_attributes(attributes.hashes)
|
50
|
-
data = @response
|
50
|
+
data = field.get_value(@response, 'array')
|
51
51
|
matched = data.select { |item| !item.empty? && item.deep_include?(expected) }
|
52
52
|
raise %/Expected #{list_comparison.to_string()} items in array that matched:\n#{expected.inspect}\n#{data}/ if !list_comparison.compare(matched.count)
|
53
53
|
end
|
54
54
|
|
55
|
-
Then("{list_has_count} {field_name} #{HAVE_ALTERNATION} (the )(following )value {string}") do |list_comparison,
|
55
|
+
Then("{list_has_count} {field_name} #{HAVE_ALTERNATION} (the )(following )value {string}") do |list_comparison, field, value|
|
56
56
|
expected = value
|
57
|
-
data = @response
|
57
|
+
data = field.get_value(@response, 'array')
|
58
58
|
matched = data.select { |item| !item.empty? && item.include?(expected) }
|
59
59
|
raise %/Expected #{list_comparison.to_string()} items in array that matched:\n#{expected}\n#{data}/ if !list_comparison.compare(matched.count)
|
60
60
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: alinta-cucumber-rest-bdd
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.22
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Harry Bragg
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2018-
|
12
|
+
date: 2018-06-26 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: cucumber-api
|