Sha256: 43310bdf0bd1723dbfe28258a00a84b332ab8faeaae39239d3fde68c0034aec8

Contents?: true

Size: 286 Bytes

Versions: 13

Compression:

Stored size: 286 Bytes

Contents

require 'facets/enumerable/probability.rb'
require 'test/unit'

class Test_Enumerable_Probability < Test::Unit::TestCase

  def test_probability
    assert_equal( {'a'=>0.5,'b'=>0.5}, %w{a b}.probability )
    assert_equal( {'tom'=>0.5,'boy'=>0.5}, %w{tom boy}.probability )
  end

end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
facets-2.8.4 test/core/enumerable/test_probability.rb
facets-2.8.3 test/core/enumerable/test_probability.rb
facets-2.8.2 test/core/enumerable/test_probability.rb
facets-2.8.1 test/core/enumerable/test_probability.rb
facets-2.8.0 test/core/enumerable/test_probability.rb
facets-2.7.0 test/core/enumerable/test_probability.rb
facets-2.6.0 test/core/enumerable/test_probability.rb
facets-2.4.4 test/core/enumerable/test_probability.rb
facets-2.4.3 test/core/enumerable/test_probability.rb
facets-2.5.1 test/core/enumerable/test_probability.rb
facets-2.5.0 test/core/enumerable/test_probability.rb
facets-2.4.5 test/core/enumerable/test_probability.rb
facets-2.5.2 test/core/enumerable/test_probability.rb