Permalink
Browse files

Moved spec to appropriate file.

  • Loading branch information...
1 parent 5ea07eb commit 9e15578c3345b16e0b5fcefb1eb6fbcc4555614f @bblimke committed Feb 12, 2014
Showing with 13 additions and 13 deletions.
  1. +13 −0 spec/acceptance/shared/returning_declared_responses.rb
  2. +0 −13 spec/acceptance/webmock_shared.rb
View
13 spec/acceptance/shared/returning_declared_responses.rb
@@ -255,6 +255,19 @@ def call(request)
stub_request(:get, "http://www.example.com/compute").to_rack(MyRackApp)
http_request(:get, "http://www.example.com/compute").status.should == "200"
end
+
+ it "preserves content-type header when proxying to a rack app" do
+ stub_request(:any, //).to_rack(lambda {|req| [200, {}, ["OK"]] })
+
+ url = "https://google.com/hi/there"
+ headers = {
+ "Accept" => "application/json",
+ "Content-Type" => "application/json"
+ }
+
+ http_request(:get, url, :headers => headers)
+ WebMock.should have_requested(:get, url).with(:headers => headers)
+ end
end
describe "when sequences of responses are declared" do
View
13 spec/acceptance/webmock_shared.rb
@@ -22,19 +22,6 @@
WebMock.reset!
end
- it "preserves content-type header when proxying to a rack app" do
- stub_request(:any, //).to_rack(lambda {|req| [200, {}, ["OK"]] })
-
- url = "https://google.com/hi/there"
- headers = {
- "Accept" => "application/json",
- "Content-Type" => "application/json"
- }
-
- http_request(:get, url, :headers => headers)
- WebMock.should have_requested(:get, url).with(:headers => headers)
- end
-
include_context "allowing and disabling net connect", *adapter_info
include_context "stubbing requests", *adapter_info

0 comments on commit 9e15578

Please sign in to comment.