2018-03-04 10:09:32 -05:00
|
|
|
require_relative '../../../spec_helper'
|
2017-05-07 08:04:49 -04:00
|
|
|
require 'net/http'
|
|
|
|
|
2018-06-14 02:41:09 -04:00
|
|
|
ruby_version_is ""..."2.6" do
|
|
|
|
describe "Net::HTTPServerException" do
|
|
|
|
it "is a subclass of Net::ProtoServerError" do
|
|
|
|
Net::HTTPServerException.should < Net::ProtoServerError
|
|
|
|
end
|
|
|
|
|
|
|
|
it "includes the Net::HTTPExceptions module" do
|
|
|
|
Net::HTTPServerException.should < Net::HTTPExceptions
|
|
|
|
end
|
2017-05-07 08:04:49 -04:00
|
|
|
end
|
2018-06-14 02:41:09 -04:00
|
|
|
end
|
|
|
|
|
|
|
|
ruby_version_is "2.6" do
|
|
|
|
describe "Net::HTTPServerException" do
|
|
|
|
it "is a subclass of Net::ProtoServerError and is warned as deprecated" do
|
2019-07-27 06:40:09 -04:00
|
|
|
-> { Net::HTTPServerException.should < Net::ProtoServerError }.should complain(/warning: constant Net::HTTPServerException is deprecated/)
|
2018-06-14 02:41:09 -04:00
|
|
|
end
|
2017-05-07 08:04:49 -04:00
|
|
|
|
2018-06-14 02:41:09 -04:00
|
|
|
it "includes the Net::HTTPExceptions module and is warned as deprecated" do
|
2019-07-27 06:40:09 -04:00
|
|
|
-> { Net::HTTPServerException.should < Net::HTTPExceptions }.should complain(/warning: constant Net::HTTPServerException is deprecated/)
|
2018-06-14 02:41:09 -04:00
|
|
|
end
|
2017-05-07 08:04:49 -04:00
|
|
|
end
|
|
|
|
end
|