From f4e5e8205ee3b63403a6b6695746046cd663d6d8 Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Mon, 28 Sep 2009 11:54:39 -0700 Subject: mappings convert --- test/visitors/test_to_ruby.rb | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'test/visitors') diff --git a/test/visitors/test_to_ruby.rb b/test/visitors/test_to_ruby.rb index f514178..db748ca 100644 --- a/test/visitors/test_to_ruby.rb +++ b/test/visitors/test_to_ruby.rb @@ -21,6 +21,13 @@ module Psych assert_equal %w{ foo bar }, seq.to_ruby end + + def test_mapping + mapping = Nodes::Mapping.new + mapping.children << Nodes::Scalar.new('foo') + mapping.children << Nodes::Scalar.new('bar') + assert_equal({'foo' => 'bar'}, mapping.to_ruby) + end end end end -- cgit v1.2.3