spec/http/http_error_spec.rb in yajl-ruby-0.7.1 vs spec/http/http_error_spec.rb in yajl-ruby-0.7.2

- old
+ new

@@ -13,21 +13,21 @@ before(:all) do @request = File.new(File.expand_path(File.dirname(__FILE__) + "/fixtures/http.error.dump"), 'r') @uri = 'file://'+File.expand_path(File.dirname(__FILE__) + "/fixtures/http/http.error.dump") TCPSocket.should_receive(:new).and_return(@request) @request.should_receive(:write) - + begin Yajl::HttpStream.get(@uri) rescue Yajl::HttpStream::HttpError => e @error = e end end it "should contain the error code in the message" do @error.message.should match(/404/) end - + it "should provide the HTTP response headers" do @error.headers.keys.should include('ETag', 'Content-Length', 'Server') end end \ No newline at end of file