Sha256: b726bedd5d944f9d93bce4b34314ea73bec8385368949216f5c3b3a3cfa9557e
Contents?: true
Size: 417 Bytes
Versions: 3
Compression:
Stored size: 417 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
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
facets-0.7.0 | test/tc_nil-as-emptiness.rb |
facets-0.7.1 | test/tc_nil-as-emptiness.rb |
facets-0.7.2 | test/tc_nil-as-emptiness.rb |