Sha256: 94986c4619a026774315b63933173b5196f46ce66eb90454fc64945b3f5e7411

Contents?: true

Size: 414 Bytes

Versions: 1

Compression:

Stored size: 414 Bytes

Contents

require 'test/unit'

require 'facet/nil_as_emptiness'


class TC_NilAsEmptiness < Test::Unit::TestCase

  def test_emptiness
    assert( nil.empty? )
    assert_equal( 0.0, nil.to_f )
    #assert_equal( false, nil.to_b )
    assert_equal( nil, nil[:any] )
    assert_equal( 0, nil.length )
    assert_equal( 0, nil.size )
    assert_equal( nil, nil.include?(:any) )   
    assert_equal( {}, nil.to_h )
  end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
facets-0.9.0 test/tc_nil_as_emptiness.rb