Sha256: f75e9eba246d6b517a8388c9d3996815142093c2497d53dd0e840c8c42f1f4bb

Contents?: true

Size: 460 Bytes

Versions: 8

Compression:

Stored size: 460 Bytes

Contents

require 'facets/hash/dearray_values'
require 'test/unit'

class TestHashDearrayValues < Test::Unit::TestCase

  def test_dearray_values
    h = { :a=>[1], :b=>[1,2], :c=>3, :d=>[] }
    x = { :a=>1, :b=>1, :c=>3, :d=>nil }
    assert_equal(x, h.dearray_values)    
  end
  
  def test_dearray_singular_values
    h = { :a=>[1], :b=>[1,2], :c=>3, :d=>[] }
    x = { :a=>1, :b=>[1,2], :c=>3, :d=>nil }
    assert_equal(x, h.dearray_singular_values )
  end

end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
facets-2.8.4 test/core/hash/test_dearray_values.rb
facets-2.8.3 test/core/hash/test_dearray_values.rb
facets-2.8.2 test/core/hash/test_dearray_values.rb
facets-2.8.1 test/core/hash/test_dearray_values.rb
facets-2.8.0 test/core/hash/test_dearray_values.rb
facets-2.7.0 test/core/hash/test_dearray_values.rb
facets-2.6.0 test/core/hash/test_dearray_values.rb
facets-2.5.2 test/core/hash/test_dearray_values.rb