diff options
Diffstat (limited to 'spec/ruby/core/array/shared/intersection.rb')
| -rw-r--r-- | spec/ruby/core/array/shared/intersection.rb | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/spec/ruby/core/array/shared/intersection.rb b/spec/ruby/core/array/shared/intersection.rb index 49849b08c2..dda72e8bd7 100644 --- a/spec/ruby/core/array/shared/intersection.rb +++ b/spec/ruby/core/array/shared/intersection.rb @@ -11,7 +11,8 @@ describe :array_intersection, shared: true do end it "creates an array with elements in order they are first encountered" do - [ 1, 2, 3, 2, 5 ].send(@method, [ 5, 2, 3, 4 ]).should == [2, 3, 5] + [ 1, 2, 3, 2, 5, 6, 7, 8 ].send(@method, [ 5, 2, 3, 4 ]).should == [2, 3, 5] # array > other + [ 5, 2, 3, 4 ].send(@method, [ 1, 2, 3, 2, 5, 6, 7, 8 ]).should == [5, 2, 3] # array < other end it "does not modify the original Array" do @@ -65,9 +66,9 @@ describe :array_intersection, shared: true do end it "does return subclass instances for Array subclasses" do - ArraySpecs::MyArray[1, 2, 3].send(@method, []).should be_an_instance_of(Array) - ArraySpecs::MyArray[1, 2, 3].send(@method, ArraySpecs::MyArray[1, 2, 3]).should be_an_instance_of(Array) - [].send(@method, ArraySpecs::MyArray[1, 2, 3]).should be_an_instance_of(Array) + ArraySpecs::MyArray[1, 2, 3].send(@method, []).should.instance_of?(Array) + ArraySpecs::MyArray[1, 2, 3].send(@method, ArraySpecs::MyArray[1, 2, 3]).should.instance_of?(Array) + [].send(@method, ArraySpecs::MyArray[1, 2, 3]).should.instance_of?(Array) end it "does not call to_ary on array subclasses" do |
