webmock 1.22.2 → 1.22.3
Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG.md
CHANGED
@@ -97,7 +97,8 @@ if defined?(Typhoeus)
|
|
97
97
|
:code => webmock_response.status[0],
|
98
98
|
:status_message => webmock_response.status[1],
|
99
99
|
:body => webmock_response.body,
|
100
|
-
:headers => webmock_response.headers
|
100
|
+
:headers => webmock_response.headers,
|
101
|
+
:effective_url => request_signature.uri
|
101
102
|
)
|
102
103
|
end
|
103
104
|
response.mock = :webmock
|
data/lib/webmock/version.rb
CHANGED
@@ -20,6 +20,18 @@ unless RUBY_PLATFORM =~ /java/
|
|
20
20
|
WebMock.reset!
|
21
21
|
end
|
22
22
|
|
23
|
+
describe "supposed response fields" do
|
24
|
+
it "present" do
|
25
|
+
stub_request(:get, "http://www.example.com").to_return(:headers => {'X-Test' => '1'})
|
26
|
+
response = Typhoeus.get("http://www.example.com")
|
27
|
+
expect(response.code).not_to be_nil
|
28
|
+
expect(response.status_message).not_to be_nil
|
29
|
+
expect(response.body).not_to be_nil
|
30
|
+
expect(response.headers).not_to be_nil
|
31
|
+
expect(response.effective_url).not_to be_nil
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
23
35
|
describe "when params are used" do
|
24
36
|
it "should take into account params for POST request" do
|
25
37
|
stub_request(:post, "www.example.com/?hello=world").with(:query => {:hello => 'world'})
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: webmock
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 73
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 1
|
8
8
|
- 22
|
9
|
-
-
|
10
|
-
version: 1.22.
|
9
|
+
- 3
|
10
|
+
version: 1.22.3
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Bartosz Blimke
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2015-
|
18
|
+
date: 2015-11-02 00:00:00 +01:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|