spec/http/http_post_spec.rb in yajl-ruby-0.6.7 vs spec/http/http_post_spec.rb in yajl-ruby-0.6.8

- old
+ new

@@ -41,23 +41,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.post(@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.post(@uri, @body) end it "should parse a raw response with hashed body" do \ No newline at end of file