Sha256: 914799dd290ed2adb2924d74b02b1d59e4ab0e3cf37f55bdffc20784fda20c6f
Contents?: true
Size: 894 Bytes
Versions: 1
Compression:
Stored size: 894 Bytes
Contents
# _____ _ # |_ _|__ ___| |_ # | |/ _ \/ __| __| # | | __/\__ \ |_ # |_|\___||___/\__| # # for lib/facets/core/ostruct/__update__.rb # # Extracted Fri Feb 16 02:00:36 EST 2007 # Project.rb Test Extraction # require 'facets/core/ostruct/__update__.rb' require 'test/unit' class TCOpenStruct < Test::Unit::TestCase def test_update o = OpenStruct.new( { :a => 1 } ) h = { :b => 2 } assert_nothing_raised { o.__update__( h ) } assert_equal( 2, o.b ) end def test_merge_1 o = OpenStruct.new( { :a => 1 } ) h = { :b => 2 } q = o.__merge__( h ) assert_equal( 1, q.a ) assert_equal( 2, q.b ) end def test_merge_2 o1 = OpenStruct.new( { :a => 1 } ) o2 = OpenStruct.new( { :b => 2 } ) q = o1.__merge__( o2 ) assert_equal( 1, q.a ) assert_equal( 2, q.b ) end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
facets-1.8.49 | test/lib/facets/core/ostruct/test___update__.rb |