spec/http/http_put_spec.rb in yajl-ruby-0.6.7 vs spec/http/http_put_spec.rb in yajl-ruby-0.6.8
- old
+ new
@@ -40,23 +40,20 @@
def prepare_mock_request_dump(format=:raw)
@request = File.new(File.expand_path(File.dirname(__FILE__) + "/fixtures/http.#{format}.dump"), 'r')
@uri = 'file://'+File.expand_path(File.dirname(__FILE__) + "/fixtures/http/http.#{format}.dump")
TCPSocket.should_receive(:new).and_return(@request)
@request.should_receive(:write)
- @uri.should_receive(:host).at_least(2).times
- @uri.should_receive(:port)
- @uri.should_receive(:path)
- @uri.should_receive(:query)
- @uri.should_receive(:userinfo)
end
it "should parse a raw response" do
prepare_mock_request_dump :raw
@template_hash.should == Yajl::HttpStream.put(@uri, @body)
end
it "should parse a raw response using instance method" do
prepare_mock_request_dump :raw
+ @uri.should_receive(:host)
+ @uri.should_receive(:port)
stream = Yajl::HttpStream.new
@template_hash.should == stream.put(@uri, @body)
end
it "should parse a raw response with hashed body" do
\ No newline at end of file