Sha256: dcb68d84b4663c025aa5f793726c2ee8ceb87247fc6e2709381f91ee2f173ecd

Contents?: true

Size: 331 Bytes

Versions: 14

Compression:

Stored size: 331 Bytes

Contents

require 'facets/enumerable/one'
require 'test/unit'

class TC_Enumerable < Test::Unit::TestCase

  def test_one?
    a = [nil, true]
    assert( a.one? )
    a = [true, false]
    assert( a.one? )
    a = [true, true]
    assert( ! a.one? )
    a = [true, 1]
    assert( ! a.one? )
    a = [1, 1]
    assert( ! a.one? )
  end

end

Version data entries

14 entries across 14 versions & 1 rubygems

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