cucumber-blendle-steps 0.8.8 → 0.9.0

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 07086baeca5e80c227695eddb44f4c39f271d136
4
- data.tar.gz: 25a69eb34f299bfcf0a89fb8b27fe161d2db4ab1
3
+ metadata.gz: 0087547916d1daeff6b67edeb76953227efc7271
4
+ data.tar.gz: 44564338a07c02decac8e1008b693890c496bf15
5
5
  SHA512:
6
- metadata.gz: a2727ea895aba990a55e0a00c70fdbd1ecd456c986c43ead8f9ee52b01111cb30d6681c4855c0871b8fdb0038870692d6b3cde56cc114eb067f5e5a1cbb09871
7
- data.tar.gz: e9e5e3ed4f41ff46c144b2da48ec9fa680bdacbdd853eb8c5213d2c4919cdb991ca0ad6dea1a1ec20cbd490aeac73c2d9a838dccb830e670c0ec46bfc6161fd4
6
+ metadata.gz: 8639d6dfcadcf459bbb1fe0325e870c82aeaf81bbb50d97de3538ab82df4b87e34875602b3d2d08450ca365d05b6edd45bec038a3d1c0556776305ad6d086829
7
+ data.tar.gz: 247bfd7cdf702dde13b0b2643afa7fe8b965b0da387872ed9ba1bc2472377e49f880aeacf1add8d17e05f3a36911f08556000e85b18c7b360603788ca2f9b95a
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- 2.3
1
+ 2.3.1
data/CHANGELOG.md CHANGED
@@ -1,5 +1,8 @@
1
1
  # CHANGELOG
2
2
 
3
+ ## [v0.8.8](https://github.com/blendle/cucumber-blendle-steps/tree/v0.8.8) (2016-06-02)
4
+ [Full Changelog](https://github.com/blendle/cucumber-blendle-steps/compare/v0.8.7...v0.8.8)
5
+
3
6
  ## [v0.8.7](https://github.com/blendle/cucumber-blendle-steps/tree/v0.8.7) (2016-06-02)
4
7
  [Full Changelog](https://github.com/blendle/cucumber-blendle-steps/compare/v0.8.6...v0.8.7)
5
8
 
@@ -99,16 +99,7 @@ end
99
99
  # { "end_date": "{{ 'today' | date }}" } => { "date": "2016-03-15T14:00:00Z" }
100
100
  #
101
101
  Then(%r{^the response should be HAL/JSON(?: \(disregarding values? of "([^"]*)"\))?:$}) do |disregard, json|
102
- dump last_response.body
103
-
104
- assert_match %r{^application/hal\+json(;.*)?$}, last_response.headers['Content-Type']
105
-
106
- hal = nil
107
- begin
108
- hal = Halidator.new(last_response.body, :json_schema)
109
- rescue JSON::ParserError => e
110
- assert false, [e.message, last_response.body].join("\n")
111
- end
102
+ step("the response should be HAL/JSON")
112
103
 
113
104
  json = Liquid::Template.parse(json).render
114
105
  match = be_json_eql(json)
@@ -120,7 +111,6 @@ Then(%r{^the response should be HAL/JSON(?: \(disregarding values? of "([^"]*)"\
120
111
  end
121
112
 
122
113
  expect(last_response.body).to match
123
- assert hal.valid?, "Halidator errors: #{hal.errors.join(',')}"
124
114
  end
125
115
 
126
116
  # * Then the response contains the "Location" header with value "https://example.org/item/hello"
@@ -133,3 +123,25 @@ Then(/^the response contains the "(.*?)" header(?: with value "(.*?)")?$/) do |h
133
123
  assert last_response.headers[header], "missing header: #{header}"
134
124
  end
135
125
  end
126
+
127
+ # * Then the response at "_embedded/b:subscription-product" should include:
128
+ # """json
129
+ # {
130
+ # "eligible": false
131
+ # }
132
+ # """
133
+ Then(/^the response at "(.*)" should include:$/) do |path, json|
134
+ expect(JsonSpec::Helpers.parse_json(last_response.body, path)).to include(JSON.parse(json))
135
+ end
136
+
137
+ Then(%r{^the response should be HAL\/JSON$}) do
138
+ assert_match %r{^application/hal\+json(;.*)?$}, last_response.headers['Content-Type']
139
+
140
+ hal = nil
141
+ begin
142
+ hal = Halidator.new(last_response.body, :json_schema)
143
+ rescue JSON::ParserError => e
144
+ assert false, [e.message, last_response.body].join("\n")
145
+ end
146
+ expect(hal).to be_valid, "Halidator errors: #{hal.errors.join(',')}"
147
+ end
@@ -6,6 +6,6 @@ module Cucumber
6
6
  # This module defines default steps used by all of Blendle Ruby projects.
7
7
  #
8
8
  module BlendleSteps
9
- VERSION = '0.8.8'.freeze
9
+ VERSION = '0.9.0'.freeze
10
10
  end
11
11
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cucumber-blendle-steps
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.8
4
+ version: 0.9.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jean Mertz
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-06-02 00:00:00.000000000 Z
11
+ date: 2016-08-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -355,7 +355,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
355
355
  version: '0'
356
356
  requirements: []
357
357
  rubyforge_project:
358
- rubygems_version: 2.6.4
358
+ rubygems_version: 2.5.1
359
359
  signing_key:
360
360
  specification_version: 4
361
361
  summary: Cucumber steps used by all of Blendle Ruby projects