diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2009-09-28 12:06:39 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2009-09-28 12:06:39 -0700 |
commit | 9f5da8f6aa0bfc3d59817de9d5c8a22000c0b9ce (patch) | |
tree | e14784f845736386b9535af1769d40a6845d0ce5 /test | |
parent | f4e5e8205ee3b63403a6b6695746046cd663d6d8 (diff) | |
download | psych-9f5da8f6aa0bfc3d59817de9d5c8a22000c0b9ce.zip |
documents can convert to ruby
Diffstat (limited to 'test')
-rw-r--r-- | test/visitors/test_to_ruby.rb | 6 |
1 files changed, 6 insertions, 0 deletions
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 |