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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1ac7073a4b7ef40af724aed16b7877cc41a6f9be00378a28cc5ad4b2618c9a16
4
- data.tar.gz: a249cd274ee25dbf9b0dc98a9ee02694e7d2b2d496b0f214eaa14048a7658add
3
+ metadata.gz: bff76d75c98acae66f82a8ec8c1cee799cea97d7273e0c519e64e31d61ce259a
4
+ data.tar.gz: f129a30c182bc749fca73f5266fe9533aefa4ecdc6b959e8ff7e4c820c23d6e6
5
5
  SHA512:
6
- metadata.gz: 00f662756503a7437ce262c0617390702e0f3027a60a78694a1badd7405a772fdf7d9803d97861d92f2902c4bb997dc9ab362e57a02b609b31b8bc52d5cb8b21
7
- data.tar.gz: c01a45c88f068edf5a6572575d2b7fc7c93d60dd77c5b8cd528521dcba8cbd9ac908e8d9ba9e47a9fcb0ecb868f5e27780bb80270a49d561bb5ede8ce03b3aab
6
+ metadata.gz: 437c149524351d31ed02870d618a4b1f9b440e86e7badf0a6645ed62790bcfd53fb4a277c81bc410493761952d44fd8e6d73a72957de3c5c8a53e3ba5d2639bb
7
+ data.tar.gz: b9d4d2b94d2835a258a6907f01a968ad6042a1b14e6f9e0e01bf69a5dd2f193ff383d291c437d0d5e0851130b18db34d09d15e2c3148ef23c6f0cb760fee9be0
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.3.1
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
- expect(response.status).to eq(expected_status),
79
- "status should be #{expected_status}, but is #{response.status}, on '#{request}'"
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
 
@@ -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
- logger.debug "Starting server: #{command}"
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.1
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.1
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.1
40
+ version: 0.3.2
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rake
43
43
  requirement: !ruby/object:Gem::Requirement