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/select_spec.rb

15 lines
324 B
Ruby
Raw Normal View History

require_relative '../../spec_helper'
require_relative 'shared/select'
describe "Array#select" do
it_behaves_like :array_select, :select
end
describe "Array#select!" do
it "returns nil if no changes were made in the array" do
[1, 2, 3].select! { true }.should be_nil
end
it_behaves_like :keep_if, :select!
end