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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8d4817da527612ba7905db64bb40230f53e4f99247857156a300119d8cbb321b
4
- data.tar.gz: 4b577d2a8fc763b96f40e8a64e9381bfb9c5e116f59234e8fe1f4ae3e707c01e
3
+ metadata.gz: e78ccb9ec136ed4347daaa0afafc066e44beaabd5a19cafbffd54a4e2039507c
4
+ data.tar.gz: 6f73934f0c2df4bb620d2e09412b1c4cb5e1273aac70d771df1e65e6ac7ca854
5
5
  SHA512:
6
- metadata.gz: 69d8d333bf464587c6faf064fa4c05e1dc6373642b3b4debf6c7729633534e5e76735cc8a9bafefa631bf45311458f55e7ec2a52f2b5bf7f0c0c6c301d58a0e5
7
- data.tar.gz: 9b6c316017b64b1a984f94f7923e2d7064fcc06ba2957fd3097b4cd674fe89703ee914ddfe62365131670e71bc911451fad4661d323749df4e58ab0e51d0384e
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, count_item, attributes|
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.get get_root_data_key()
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, count_item, value|
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.get get_root_data_key()
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.21
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-05-15 00:00:00.000000000 Z
12
+ date: 2018-06-26 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: cucumber-api