Sha256: f1dad7bea503a7c45472dc222e61210134a5235a63399a2f7a56db9465ad152e

Contents?: true

Size: 379 Bytes

Versions: 5

Compression:

Stored size: 379 Bytes

Contents

covers 'facets/enumerable/purge'

test_case Enumerable do

  method :purge do

    test do
      [1, nil, 2].purge.assert == [1,2]
    end

    test "with trash arguments" do
      (1..6).purge(3,4).assert == [1,2,5,6]
    end

    test "with block" do
      (1..6).purge(0){ |n| n % 2 }.assert == [1,3,5]
      (1..6).purge(1){ |n| n % 2 }.assert == [2,4,6]
    end

  end

end

Version data entries

5 entries across 5 versions & 2 rubygems

Version Path
facets-glimmer-3.2.0 test/core/enumerable/test_purge.rb
facets-3.1.0 test/core/enumerable/test_purge.rb
facets-3.0.0 test/core/enumerable/test_purge.rb
facets-2.9.3 test/core/enumerable/test_purge.rb
facets-2.9.2 test/core/enumerable/test_purge.rb