diff options
Diffstat (limited to 'spec/ruby/library/net/http/httpresponse/exception_type_spec.rb')
-rw-r--r-- | spec/ruby/library/net/http/httpresponse/exception_type_spec.rb | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/spec/ruby/library/net/http/httpresponse/exception_type_spec.rb b/spec/ruby/library/net/http/httpresponse/exception_type_spec.rb new file mode 100644 index 0000000000..e1a48e0c12 --- /dev/null +++ b/spec/ruby/library/net/http/httpresponse/exception_type_spec.rb @@ -0,0 +1,13 @@ +require File.expand_path('../../../../../spec_helper', __FILE__) +require 'net/http' + +describe "Net::HTTPResponse.exception_type" do + it "returns self's 'EXCEPTION_TYPE' constant" do + Net::HTTPUnknownResponse.exception_type.should == Net::HTTPError + Net::HTTPInformation.exception_type.should == Net::HTTPError + Net::HTTPSuccess.exception_type.should == Net::HTTPError + Net::HTTPRedirection.exception_type.should == Net::HTTPRetriableError + Net::HTTPClientError.exception_type.should == Net::HTTPServerException + Net::HTTPServerError.exception_type.should == Net::HTTPFatalError + end +end |