mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Update to ruby/spec@37e52e5
This commit is contained in:
parent
dbea0be13d
commit
36dde35e02
48 changed files with 811 additions and 64 deletions
|
@ -1,4 +1,5 @@
|
|||
require_relative '../../spec_helper'
|
||||
require_relative 'fixtures/classes'
|
||||
|
||||
describe "Array#drop" do
|
||||
it "removes the specified number of elements from the start of the array" do
|
||||
|
@ -48,4 +49,16 @@ describe "Array#drop" do
|
|||
|
||||
-> { [1, 2].drop(obj) }.should raise_error(TypeError)
|
||||
end
|
||||
|
||||
ruby_version_is ''...'3.0' do
|
||||
it 'returns a subclass instance for Array subclasses' do
|
||||
ArraySpecs::MyArray[1, 2, 3, 4, 5].drop(1).should be_an_instance_of(ArraySpecs::MyArray)
|
||||
end
|
||||
end
|
||||
|
||||
ruby_version_is '3.0' do
|
||||
it 'returns a Array instance for Array subclasses' do
|
||||
ArraySpecs::MyArray[1, 2, 3, 4, 5].drop(1).should be_an_instance_of(Array)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue