diff options
author | filialpails <bobert_1234567890@hotmail.com> | 2015-03-30 19:34:25 -0400 |
---|---|---|
committer | filialpails <bobert_1234567890@hotmail.com> | 2015-03-30 19:34:25 -0400 |
commit | 3ed6bf733c6e2401780115b0cd64736eca5f2244 (patch) | |
tree | 0c2e38d322e1cd9bd2321d9d9bd64ef2c711e7ca | |
parent | a9c56c5ece54deaa05d7d2a584eaafb1891993c1 (diff) | |
download | psych-3ed6bf733c6e2401780115b0cd64736eca5f2244.tar.gz |
add test
-rw-r--r-- | test/psych/visitors/test_to_ruby.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/test/psych/visitors/test_to_ruby.rb b/test/psych/visitors/test_to_ruby.rb index c13d980..5c6ba2b 100644 --- a/test/psych/visitors/test_to_ruby.rb +++ b/test/psych/visitors/test_to_ruby.rb @@ -321,6 +321,13 @@ description: assert_equal %w{ foo foo }, list assert_equal list[0].object_id, list[1].object_id end + + def test_mapping_with_str_tag + mapping = Nodes::Mapping.new(nil, '!strawberry') + mapping.children << Nodes::Scalar.new('foo') + mapping.children << Nodes::Scalar.new('bar') + assert_equal({'foo' => 'bar'}, mapping.to_ruby) + end end end end |