Sha256: a872df3429d8e93380c0335beeaad1ae85d4dbbf95d28f4302db063e53756f62

Contents?: true

Size: 713 Bytes

Versions: 1

Compression:

Stored size: 713 Bytes

Contents

#  _____         _
# |_   _|__  ___| |_
#   | |/ _ \/ __| __|
#   | |  __/\__ \ |_
#   |_|\___||___/\__|
#
# for lib/nano/ostruct/__merge__.rb
#
# Extracted Fri Oct 28 14:20:18 EDT 2005
# Unit Tools Reap Test Extractor
#

require 'nano/ostruct/__merge__.rb'


  require 'test/unit'

  class TC_OpenStruct < Test::Unit::TestCase

    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-0.9.0 test/lib/nano/ostruct/test___merge__.rb