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

- old
+ new

@@ -114,6 +114,11 @@ it "should throw InvalidContentType if unable to handle the MIME type" do prepare_mock_request_dump :html lambda {Yajl::HttpStream.post(@uri, @body)}.should raise_error(Yajl::HttpStream::InvalidContentType) end + + it "should raise when an HTTP code that isn't 200 is returned" do + prepare_mock_request_dump :error + lambda { Yajl::HttpStream.post(@uri, @body) }.should raise_exception(Yajl::HttpStream::HttpError) + end end \ No newline at end of file