1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* test/yaml/test_hash.rb (test_ref_append): adding a test for idref

append nodes.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27020 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
tenderlove 2010-03-22 20:18:57 +00:00
parent 0899c59b4b
commit 094d03c5d3

View file

@ -14,5 +14,16 @@ module YAML
def test_dump
assert_equal @hash, YAML.load(YAML.dump(@hash))
end
def test_ref_append
hash = YAML.load(<<-eoyml)
---
foo: &foo
hello: world
bar:
<<: *foo
eoyml
assert_equal({"foo"=>{"hello"=>"world"}, "bar"=>{"hello"=>"world"}}, hash)
end
end
end