From 9f5da8f6aa0bfc3d59817de9d5c8a22000c0b9ce Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Mon, 28 Sep 2009 12:06:39 -0700 Subject: documents can convert to ruby --- test/visitors/test_to_ruby.rb | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'test') diff --git a/test/visitors/test_to_ruby.rb b/test/visitors/test_to_ruby.rb index db748ca..c295caf 100644 --- a/test/visitors/test_to_ruby.rb +++ b/test/visitors/test_to_ruby.rb @@ -28,6 +28,12 @@ module Psych mapping.children << Nodes::Scalar.new('bar') assert_equal({'foo' => 'bar'}, mapping.to_ruby) end + + def test_document + doc = Nodes::Document.new + doc.children << Nodes::Scalar.new('foo') + assert_equal 'foo', doc.to_ruby + end end end end -- cgit v1.2.3