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 +4 -4
- data/.ruby-version +1 -1
- data/CHANGELOG.md +3 -0
- data/lib/cucumber/blendle/steps/rest_steps.rb +23 -11
- data/lib/cucumber/blendle/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 0087547916d1daeff6b67edeb76953227efc7271
|
|
4
|
+
data.tar.gz: 44564338a07c02decac8e1008b693890c496bf15
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
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
|
-
|
|
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
|
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.
|
|
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-
|
|
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.
|
|
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
|