summaryrefslogtreecommitdiff
path: root/spec/ruby/core/array/keep_if_spec.rb
blob: 40f7329b7c8e81bc742539124dd36337be81bd3f (plain)
1
2
3
4
5
6
7
8
9
10
11
require_relative '../../spec_helper'
require_relative 'shared/keep_if'

describe "Array#keep_if" do
  it "returns the same array if no changes were made" do
    array = [1, 2, 3]
    array.keep_if { true }.should equal(array)
  end

  it_behaves_like :keep_if, :keep_if
end