diff options
Diffstat (limited to 'spec/ruby/library/net/http/httpresponse/error_type_spec.rb')
-rw-r--r-- | spec/ruby/library/net/http/httpresponse/error_type_spec.rb | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/spec/ruby/library/net/http/httpresponse/error_type_spec.rb b/spec/ruby/library/net/http/httpresponse/error_type_spec.rb index 9e45e8fac2..6705f8b1aa 100644 --- a/spec/ruby/library/net/http/httpresponse/error_type_spec.rb +++ b/spec/ruby/library/net/http/httpresponse/error_type_spec.rb @@ -16,7 +16,12 @@ describe "Net::HTTPResponse#error_type" do res.error_type.should == Net::HTTPRetriableError res = Net::HTTPClientError.new("1.0", "4xx", "test response") - res.error_type.should == Net::HTTPServerException + ruby_version_is ""..."2.6" do + res.error_type.should == Net::HTTPServerException + end + ruby_version_is "2.6" do + res.error_type.should == Net::HTTPClientException + end res = Net::HTTPServerError.new("1.0", "5xx", "test response") res.error_type.should == Net::HTTPFatalError |