1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
ruby--ruby/spec/ruby/core/array/intersect_spec.rb
2021-09-07 19:01:07 +02:00

17 lines
483 B
Ruby

require_relative '../../spec_helper'
describe 'Array#intersect?' do
ruby_version_is '3.1' do # https://bugs.ruby-lang.org/issues/15198
describe 'when at least one element in two Arrays is the same' do
it 'returns true' do
[1, 2].intersect?([2, 3]).should == true
end
end
describe 'when there are no elements in common between two Arrays' do
it 'returns false' do
[1, 2].intersect?([3, 4]).should == false
end
end
end
end