spec/spec_helper.rb in alexvollmer-httparty-0.2.6 vs spec/spec_helper.rb in alexvollmer-httparty-0.3.1

- old
+ new

@@ -8,17 +8,14 @@ end def stub_http_response_with(filename) format = filename.split('.').last.intern data = file_fixture(filename) - http = Net::HTTP.new('localhost', 80) - + response = Net::HTTPOK.new("1.1", 200, "Content for you") response.stub!(:body).and_return(data) - http.stub!(:request).and_return(response) - - http_request = HTTParty::Request.new(Net::HTTP::Get, '') - http_request.stub!(:get_response).and_return(response) - http_request.stub!(:format).and_return(format) - + + http_request = HTTParty::Request.new(Net::HTTP::Get, 'http://localhost', :format => format) + http_request.stub!(:perform_actual_request).and_return(response) + HTTParty::Request.should_receive(:new).and_return(http_request) end \ No newline at end of file