Sha256: c7d8c4c9993b1aa0fc4b5f097f8a6e47d38172e3a3ea02c6fa4069e1b0d358bd
Contents?: true
Size: 366 Bytes
Versions: 52
Compression:
Stored size: 366 Bytes
Contents
describe :keep_if, :shared => true do it "deletes elements for which the block returns a false value" do array = [1, 2, 3, 4, 5] array.send(@method) {|item| item > 3 }.should equal(array) array.should == [4, 5] end it "returns an enumerator if no block is given" do [1, 2, 3].send(@method).should be_an_instance_of(enumerator_class) end end
Version data entries
52 entries across 52 versions & 2 rubygems