cucumber-rest-bdd 0.4.3.pre.122 → 0.4.3
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/features/functional.feature +0 -4
- data/lib/cucumber-rest-bdd/steps/functional.rb +0 -7
- 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: 6ef5fa8810af911c8b7e8db2ccabcba4a3d6da5a
|
4
|
+
data.tar.gz: f564daf37e42d8a8b59b856a7a97ebc8bfa9f59b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e0d9f00d863229ebf44c7b54f7b7d41303195e81c4a84b1baacecd180a15ddc1435aca4761cb7f0d59643517f48fc9efe2b4f4f40fd0250c402c338ea1ce1c2f
|
7
|
+
data.tar.gz: 33c9262c7e89764300f6582dc83085f5540df2971365c4e62cdeaed59e13e806288a8e86bae26a44ef95d30fb48d2361e51a894033e1336de4d6b5a6bea28a42
|
data/features/functional.feature
CHANGED
@@ -7,11 +7,7 @@ Feature: Performing different rest methods
|
|
7
7
|
When I request a list of posts with:
|
8
8
|
| User Id | 8 |
|
9
9
|
Then the request is successful
|
10
|
-
And the JSON response should have "$." of type array with at least 1 entry
|
11
|
-
And the JSON response should have "$." of type array with at least 10 entries
|
12
10
|
And the JSON response should have "$." of type array with 10 entries
|
13
|
-
And the JSON response should have "$." of type array with at most 10 entries
|
14
|
-
And the JSON response should have "$." of type array with at most 11 entries
|
15
11
|
|
16
12
|
Scenario: Check for null type
|
17
13
|
When I request to create a post with:
|
@@ -1,6 +1,5 @@
|
|
1
1
|
require 'cucumber-api/response'
|
2
2
|
require 'cucumber-api/steps'
|
3
|
-
require 'cucumber-rest-bdd/types'
|
4
3
|
|
5
4
|
Then(/^the response (?:should have|has a|has the) header "([^"]*)" with (?:a |the )?value "([^"]*)"$/) do |header, value|
|
6
5
|
p_value = resolve(value)
|
@@ -15,12 +14,6 @@ Then(/^the JSON response should have "([^"]*)" of type array with (\d+) entr(?:y
|
|
15
14
|
raise %/Expected #{number} items in array for path '#{json_path}', found: #{list.count}\n#{@response.to_json_s}/ if list.count != number.to_i
|
16
15
|
end
|
17
16
|
|
18
|
-
Then(/^the JSON response should have "([^"]*)" of type array with (#{FEWER_MORE_THAN}) (\d+) entr(?:y|ies)$/) do |json_path, count_mod, number|
|
19
|
-
list = @response.get_as_type json_path, 'array'
|
20
|
-
raise %/Expected #{count_mod} #{number} items in array for path '#{json_path}', found: #{list.count}\n#{@response.to_json_s}/ \
|
21
|
-
if !num_compare(count_mod, list.count, number.to_i)
|
22
|
-
end
|
23
|
-
|
24
17
|
Then(/^the JSON response should have "([^"]*)" of type (.+) that matches "(.+)"$/) do |json_path, type, regex|
|
25
18
|
value = @response.get_as_type json_path, type
|
26
19
|
raise %/Expected #{json_path} value '#{value}' to match regex: #{regex}\n#{@response.to_json_s}/ if (Regexp.new(regex) =~ value).nil?
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cucumber-rest-bdd
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.3
|
4
|
+
version: 0.4.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Harry Bragg
|
@@ -104,9 +104,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
104
104
|
version: '0'
|
105
105
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
106
106
|
requirements:
|
107
|
-
- - "
|
107
|
+
- - ">="
|
108
108
|
- !ruby/object:Gem::Version
|
109
|
-
version:
|
109
|
+
version: '0'
|
110
110
|
requirements: []
|
111
111
|
rubyforge_project:
|
112
112
|
rubygems_version: 2.4.8
|