mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Update to ruby/spec@b65d01f
This commit is contained in:
parent
15d05f8120
commit
6998d75824
186 changed files with 3956 additions and 3339 deletions
|
@ -2,23 +2,21 @@ require_relative '../../spec_helper'
|
|||
require_relative 'fixtures/classes'
|
||||
require_relative 'shared/difference'
|
||||
|
||||
ruby_version_is "2.6" do
|
||||
describe "Array#difference" do
|
||||
it_behaves_like :array_binary_difference, :difference
|
||||
describe "Array#difference" do
|
||||
it_behaves_like :array_binary_difference, :difference
|
||||
|
||||
it "returns a copy when called without any parameter" do
|
||||
x = [1, 2, 3, 2]
|
||||
x.difference.should == x
|
||||
x.difference.should_not equal x
|
||||
end
|
||||
it "returns a copy when called without any parameter" do
|
||||
x = [1, 2, 3, 2]
|
||||
x.difference.should == x
|
||||
x.difference.should_not equal x
|
||||
end
|
||||
|
||||
it "does not return subclass instances for Array subclasses" do
|
||||
ArraySpecs::MyArray[1, 2, 3].difference.should be_an_instance_of(Array)
|
||||
end
|
||||
it "does not return subclass instances for Array subclasses" do
|
||||
ArraySpecs::MyArray[1, 2, 3].difference.should be_an_instance_of(Array)
|
||||
end
|
||||
|
||||
it "accepts multiple arguments" do
|
||||
x = [1, 2, 3, 1]
|
||||
x.difference([], [0, 1], [3, 4], [3]).should == [2]
|
||||
end
|
||||
it "accepts multiple arguments" do
|
||||
x = [1, 2, 3, 1]
|
||||
x.difference([], [0, 1], [3, 4], [3]).should == [2]
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue