cucumber-http 0.5.1 → 0.6.0

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: 70917cc0394f65db06b914e26836bf920b17fc5120127679a53036d379ebe4c1
4
- data.tar.gz: e0f37cc9f42f5ccaae713d2552fbd94de84f8d36c1384f981666bb0556515298
3
+ metadata.gz: c75c0db8674ba9d8fd6b0cf5c1d9c7f8f8854f37a800dad01fe8d43b744beecf
4
+ data.tar.gz: f8e1726ef35a5148f3327b94a8633b670dca929cf6dfc6193827c2a38df3f0c2
5
5
  SHA512:
6
- metadata.gz: d046821b5b54f7a6ed66c5af93508960c3f5191255f9bae74ab683443434c91a87e817d7c5637c3925b1695682dd835a6e2ce53bc4dba53f020df6e9ee98c3a0
7
- data.tar.gz: cf9804b017bb0c10f7ffa132af654fe0d1749b95d5fa06cd18a81e16c40529ca9adf035e385879bbfc35e74e1dd69f047843eeb58c6d1609c5d615934b35856e
6
+ metadata.gz: 605f04856f7872c474d30fc030cb0686bce7f7a7a2dc15e94e0f3c9c2905e6a891da62bad1d05df077ff380e66bdd66e375a85e9c981b3c2e71808891c886e28
7
+ data.tar.gz: 61770eb34b0b42d4835c7ed090e1811f5e8bae21718d7b17e474a9a64b63c18cd951bdd50ef153f09d057dc97c674884b87048c7db14995b5dd711f12cb6119c
data/README.md CHANGED
@@ -57,7 +57,7 @@ Given /^I am benchmarking$/
57
57
  ```
58
58
 
59
59
  ```ruby
60
- Then /^the elapsed time should be less than (#{CAPTURE_FLOAT}) seconds?$/
60
+ Then 'the elapsed time should be less than {float} second(s)'
61
61
  ```
62
62
 
63
63
  #### HTTP
@@ -103,7 +103,11 @@ When /^I send a (GET|POST|PATCH|PUT|DELETE) request to "([^"]*)"(?: with paramet
103
103
  ```
104
104
 
105
105
  ```ruby
106
- Then /^the response status should( not)? be "(#{CAPTURE_INTEGER})"$/
106
+ Then 'the response status should be "{int}"'
107
+ ```
108
+
109
+ ```ruby
110
+ Then 'the response status should not be "{int}"'
107
111
  ```
108
112
 
109
113
  ```ruby
@@ -138,7 +142,7 @@ Examples for testing the [REST API](https://apidoc.uitdatabank.be) of
138
142
 
139
143
  Creating an organizer with a random name:
140
144
  ```ruby
141
- When /^I create an organizer with a random name of (#{CAPTURE_INTEGER}) characters?$/ do |characters|
145
+ When 'I create an organizer with a random name of {integer} character(s)' do |characters|
142
146
  name = Faker::Lorem.characters(characters)
143
147
  steps %Q{
144
148
  Given I am using the UDB3 development environment
@@ -155,7 +159,7 @@ end
155
159
 
156
160
  Creating a role with a random name:
157
161
  ```ruby
158
- When /^I create a role with a random name of (#{CAPTURE_INTEGER}) characters?$/ do |characters|
162
+ When 'I create a role with a random name of {integer} character(s)' do |characters|
159
163
  name = Faker::Lorem.characters(characters)
160
164
  steps %Q{
161
165
  Given I am using the UDB3 development environment
@@ -2,7 +2,7 @@ Given /^I am benchmarking$/ do
2
2
  @scenario_start_time = Time.now
3
3
  end
4
4
 
5
- Then /^the elapsed time should be less than (#{CAPTURE_FLOAT}) seconds?$/ do |time|
5
+ Then 'the elapsed time should be less than {float} second(s)' do |time|
6
6
  elapsed = Time.now - @scenario_start_time
7
7
 
8
8
  expect(elapsed).to be < time
@@ -92,12 +92,12 @@ When /^(?:I )?keep the value of the (?:JSON|json)(?: response)?(?: at "(.*)")? a
92
92
  JsonSpec.memorize(key, parse_json(last_json, path))
93
93
  end
94
94
 
95
- Then /^the response status should( not)? be "(#{CAPTURE_INTEGER})"$/ do |negative, status_code|
96
- if negative
97
- expect(response[:status]).not_to eq(status_code)
98
- else
99
- expect(response[:status]).to eq(status_code)
100
- end
95
+ Then 'the response status should be "{int}"' do |status_code|
96
+ expect(response[:status]).to eq(status_code)
97
+ end
98
+
99
+ Then 'the response status should not be "{int}"' do |status_code|
100
+ expect(response[:status]).not_to eq(status_code)
101
101
  end
102
102
 
103
103
  Then /^the response body should be valid JSON$/ do
@@ -1,5 +1,5 @@
1
1
  module Cucumber
2
2
  module Http
3
- VERSION = "0.5.1"
3
+ VERSION = "0.6.0"
4
4
  end
5
5
  end
data/lib/cucumber/http.rb CHANGED
@@ -1,4 +1,3 @@
1
- require 'cucumber/http/transforms'
2
1
  require 'cucumber/http/world_extensions'
3
2
  require 'cucumber/http/hooks'
4
3
  require 'cucumber/http/http_steps'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cucumber-http
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.1
4
+ version: 0.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kristof Willaert
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-02-09 00:00:00.000000000 Z
11
+ date: 2022-02-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: cucumber
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '2.0'
19
+ version: '3.0'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '2.0'
26
+ version: '3.0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: json_spec
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -72,14 +72,14 @@ dependencies:
72
72
  requirements:
73
73
  - - "~>"
74
74
  - !ruby/object:Gem::Version
75
- version: '10.0'
75
+ version: '13.0'
76
76
  type: :development
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
80
  - - "~>"
81
81
  - !ruby/object:Gem::Version
82
- version: '10.0'
82
+ version: '13.0'
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: bundler
85
85
  requirement: !ruby/object:Gem::Requirement
@@ -107,7 +107,6 @@ files:
107
107
  - lib/cucumber/http/debug_steps.rb
108
108
  - lib/cucumber/http/hooks.rb
109
109
  - lib/cucumber/http/http_steps.rb
110
- - lib/cucumber/http/transforms.rb
111
110
  - lib/cucumber/http/version.rb
112
111
  - lib/cucumber/http/world_extensions.rb
113
112
  - lib/cucumber/http/world_extensions/headers.rb
@@ -1,7 +0,0 @@
1
- CAPTURE_INTEGER = Transform /^(-?\d+)$/ do |number_string|
2
- number_string.to_i
3
- end
4
-
5
- CAPTURE_FLOAT = Transform /^(-?[\d.]+)$/ do |number_string|
6
- number_string.to_f
7
- end