Sha256: 4f89dbab02ae9f9276f287979e03d231e40d91cb5c4f17bce5d13d4045132f3c
Contents?: true
Size: 374 Bytes
Versions: 2
Compression:
Stored size: 374 Bytes
Contents
require 'facets/hash/to_module' require 'test/unit' class TC_Hash_To_Module < Test::Unit::TestCase def test_to_module h = { :a=>1, :b=>2 } m = h.to_module assert(Module === m) end def test_to_module_methods h = { :a=>1, :b=>2 } m = h.to_module x = Class.new{ include m }.new assert_equal( 1, x.a ) assert_equal( 2, x.b ) end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
facets-2.8.4 | test/core/hash/test_to_module.rb |
facets-2.8.3 | test/core/hash/test_to_module.rb |