Sha256: a72a8faabd8e25136a94ea34a3fccc24f8cfe29c480379f89977d84288620ff9

Contents?: true

Size: 350 Bytes

Versions: 2

Compression:

Stored size: 350 Bytes

Contents

covers 'facets/enumerable/occur'

test_case Enumerable do

  method :occur do

    arr = [:a,:b,:a]

    test do
      arr.occur(1).assert == [:b]
    end

    test do
      arr.occur(2).assert == [:a]
    end

    test do
      arr.occur(1..1).assert == [:b]
    end

    test do
      arr.occur{ |n| n % 2 == 0 }.assert == [:a]
    end

  end

end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
facets-2.9.3 test/core/enumerable/test_occur.rb
facets-2.9.2 test/core/enumerable/test_occur.rb