rspec-httpd 0.3.1 → 0.3.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/lib/rspec/httpd.rb +17 -2
- data/lib/rspec/httpd/server.rb +6 -2
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bff76d75c98acae66f82a8ec8c1cee799cea97d7273e0c519e64e31d61ce259a
|
4
|
+
data.tar.gz: f129a30c182bc749fca73f5266fe9533aefa4ecdc6b959e8ff7e4c820c23d6e6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 437c149524351d31ed02870d618a4b1f9b440e86e7badf0a6645ed62790bcfd53fb4a277c81bc410493761952d44fd8e6d73a72957de3c5c8a53e3ba5d2639bb
|
7
|
+
data.tar.gz: b9d4d2b94d2835a258a6907f01a968ad6042a1b14e6f9e0e01bf69a5dd2f193ff383d291c437d0d5e0851130b18db34d09d15e2c3148ef23c6f0cb760fee9be0
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.3.
|
1
|
+
0.3.2
|
data/lib/rspec/httpd.rb
CHANGED
@@ -75,8 +75,23 @@ module RSpec::Httpd
|
|
75
75
|
response = client.response
|
76
76
|
request = response.request
|
77
77
|
|
78
|
-
|
79
|
-
|
78
|
+
if response.status != expected_status
|
79
|
+
error_message = <<~MSG
|
80
|
+
#{response.class}
|
81
|
+
#{response.request.class}
|
82
|
+
HTTP status should be #{expected_status}, but is #{response.status}, on '#{request}'
|
83
|
+
MSG
|
84
|
+
|
85
|
+
if response.status >= 400
|
86
|
+
error_message += <<~MSG
|
87
|
+
---- response.body ----------------------------------------------------
|
88
|
+
#{response.body}
|
89
|
+
-----------------------------------------------------------------------
|
90
|
+
MSG
|
91
|
+
end
|
92
|
+
|
93
|
+
expect(response.status).to eq(expected_status), error_message
|
94
|
+
end
|
80
95
|
|
81
96
|
return if expected.nil? || expected.is_a?(Integer)
|
82
97
|
|
data/lib/rspec/httpd/server.rb
CHANGED
@@ -49,8 +49,12 @@ module RSpec::Httpd
|
|
49
49
|
logger.error "A process is already running on #{host}:#{port}"
|
50
50
|
exit 2
|
51
51
|
end
|
52
|
-
|
53
|
-
|
52
|
+
|
53
|
+
STDERR.puts <<~MSG
|
54
|
+
==== Starting server ================================================================
|
55
|
+
#{command}
|
56
|
+
=====================================================================================
|
57
|
+
MSG
|
54
58
|
|
55
59
|
# start child process in a separate process group. at exit we'll
|
56
60
|
# kill the entire process group. This helps if the started process
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rspec-httpd
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Enrico Thierbach
|
@@ -30,14 +30,14 @@ dependencies:
|
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 0.3.
|
33
|
+
version: 0.3.2
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: 0.3.
|
40
|
+
version: 0.3.2
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: rake
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|