summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfilialpails <bobert_1234567890@hotmail.com>2015-03-30 19:34:25 -0400
committerfilialpails <bobert_1234567890@hotmail.com>2015-03-30 19:34:25 -0400
commit3ed6bf733c6e2401780115b0cd64736eca5f2244 (patch)
tree0c2e38d322e1cd9bd2321d9d9bd64ef2c711e7ca
parenta9c56c5ece54deaa05d7d2a584eaafb1891993c1 (diff)
downloadpsych-3ed6bf733c6e2401780115b0cd64736eca5f2244.tar.gz
add test
-rw-r--r--test/psych/visitors/test_to_ruby.rb7
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