Sha256: 4ec60911393f2193fec18f176fea882462a63edb0bf933f6afb761cdeeec1b7f
Contents?: true
Size: 337 Bytes
Versions: 3
Compression:
Stored size: 337 Bytes
Contents
covers 'facets/array/occurrence' test_case Array do method :occurrence do test "no arguments" do r = [:a,:a,:b,:c,:c,:c].occurrence r.assert == { :a => 2, :b => 1, :c => 3 } end test "with block" do r = [2,2,3,4,4,4].occurrence{|i| i % 2} r.assert == { 0 => 5, 1 => 1 } end end end
Version data entries
3 entries across 3 versions & 2 rubygems
Version | Path |
---|---|
facets-glimmer-3.2.0 | test/core/array/test_occurrence.rb |
facets-3.1.0 | test/core/array/test_occurrence.rb |
facets-3.0.0 | test/core/array/test_occurrence.rb |