diff options
Diffstat (limited to 'spec/ruby/library/net-http/httpheader/shared')
5 files changed, 15 insertions, 15 deletions
diff --git a/spec/ruby/library/net-http/httpheader/shared/each_capitalized.rb b/spec/ruby/library/net-http/httpheader/shared/each_capitalized.rb index 3bac409876..c12df62787 100644 --- a/spec/ruby/library/net-http/httpheader/shared/each_capitalized.rb +++ b/spec/ruby/library/net-http/httpheader/shared/each_capitalized.rb @@ -19,7 +19,7 @@ describe :net_httpheader_each_capitalized, shared: true do describe "when passed no block" do it "returns an Enumerator" do enumerator = @headers.send(@method) - enumerator.should be_an_instance_of(Enumerator) + enumerator.should.instance_of?(Enumerator) res = [] enumerator.each do |*key| diff --git a/spec/ruby/library/net-http/httpheader/shared/each_header.rb b/spec/ruby/library/net-http/httpheader/shared/each_header.rb index 6bf3a6ddfe..5913665a4d 100644 --- a/spec/ruby/library/net-http/httpheader/shared/each_header.rb +++ b/spec/ruby/library/net-http/httpheader/shared/each_header.rb @@ -19,7 +19,7 @@ describe :net_httpheader_each_header, shared: true do describe "when passed no block" do it "returns an Enumerator" do enumerator = @headers.send(@method) - enumerator.should be_an_instance_of(Enumerator) + enumerator.should.instance_of?(Enumerator) res = [] enumerator.each do |*key| diff --git a/spec/ruby/library/net-http/httpheader/shared/each_name.rb b/spec/ruby/library/net-http/httpheader/shared/each_name.rb index efc6a09dfd..29c9400fef 100644 --- a/spec/ruby/library/net-http/httpheader/shared/each_name.rb +++ b/spec/ruby/library/net-http/httpheader/shared/each_name.rb @@ -19,7 +19,7 @@ describe :net_httpheader_each_name, shared: true do describe "when passed no block" do it "returns an Enumerator" do enumerator = @headers.send(@method) - enumerator.should be_an_instance_of(Enumerator) + enumerator.should.instance_of?(Enumerator) res = [] enumerator.each do |key| diff --git a/spec/ruby/library/net-http/httpheader/shared/set_range.rb b/spec/ruby/library/net-http/httpheader/shared/set_range.rb index 87f51d46f3..9ab50a075e 100644 --- a/spec/ruby/library/net-http/httpheader/shared/set_range.rb +++ b/spec/ruby/library/net-http/httpheader/shared/set_range.rb @@ -5,13 +5,13 @@ describe :net_httpheader_set_range, shared: true do describe "when passed nil" do it "returns nil" do - @headers.send(@method, nil).should be_nil + @headers.send(@method, nil).should == nil end it "deletes the 'Range' header entry" do @headers["Range"] = "bytes 0-499/1234" @headers.send(@method, nil) - @headers["Range"].should be_nil + @headers["Range"].should == nil end end @@ -50,15 +50,15 @@ describe :net_httpheader_set_range, shared: true do end it "raises a Net::HTTPHeaderSyntaxError when the first Range element is negative" do - -> { @headers.send(@method, -10..5) }.should raise_error(Net::HTTPHeaderSyntaxError) + -> { @headers.send(@method, -10..5) }.should.raise(Net::HTTPHeaderSyntaxError) end it "raises a Net::HTTPHeaderSyntaxError when the last Range element is negative" do - -> { @headers.send(@method, 10..-5) }.should raise_error(Net::HTTPHeaderSyntaxError) + -> { @headers.send(@method, 10..-5) }.should.raise(Net::HTTPHeaderSyntaxError) end it "raises a Net::HTTPHeaderSyntaxError when the last Range element is smaller than the first" do - -> { @headers.send(@method, 10..5) }.should raise_error(Net::HTTPHeaderSyntaxError) + -> { @headers.send(@method, 10..5) }.should.raise(Net::HTTPHeaderSyntaxError) end end @@ -75,15 +75,15 @@ describe :net_httpheader_set_range, shared: true do end it "raises a Net::HTTPHeaderSyntaxError when start is negative" do - -> { @headers.send(@method, -10, 5) }.should raise_error(Net::HTTPHeaderSyntaxError) + -> { @headers.send(@method, -10, 5) }.should.raise(Net::HTTPHeaderSyntaxError) end it "raises a Net::HTTPHeaderSyntaxError when start + length is negative" do - -> { @headers.send(@method, 10, -15) }.should raise_error(Net::HTTPHeaderSyntaxError) + -> { @headers.send(@method, 10, -15) }.should.raise(Net::HTTPHeaderSyntaxError) end it "raises a Net::HTTPHeaderSyntaxError when length is negative" do - -> { @headers.send(@method, 10, -4) }.should raise_error(Net::HTTPHeaderSyntaxError) + -> { @headers.send(@method, 10, -4) }.should.raise(Net::HTTPHeaderSyntaxError) end end end diff --git a/spec/ruby/library/net-http/httpheader/shared/size.rb b/spec/ruby/library/net-http/httpheader/shared/size.rb index e2b1e4c22b..b38310a940 100644 --- a/spec/ruby/library/net-http/httpheader/shared/size.rb +++ b/spec/ruby/library/net-http/httpheader/shared/size.rb @@ -4,15 +4,15 @@ describe :net_httpheader_size, shared: true do end it "returns the number of header entries in self" do - @headers.send(@method).should eql(0) + @headers.send(@method).should.eql?(0) @headers["a"] = "b" - @headers.send(@method).should eql(1) + @headers.send(@method).should.eql?(1) @headers["b"] = "b" - @headers.send(@method).should eql(2) + @headers.send(@method).should.eql?(2) @headers["c"] = "c" - @headers.send(@method).should eql(3) + @headers.send(@method).should.eql?(3) end end |
