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