summaryrefslogtreecommitdiff
path: root/test/psych/visitors
diff options
context:
space:
mode:
Diffstat (limited to 'test/psych/visitors')
-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 c13d980468..5c6ba2b397 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