diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2009-09-28 11:51:09 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2009-09-28 11:51:09 -0700 |
commit | 483d0d30bf783e04dfdb458b65219281dda76cff (patch) | |
tree | 45d4b772528772b7e2ffd03a7e4c02e77c8bee78 /test | |
parent | a469ea7ffe371dd5e69f1d65485a06c5bc66e6fa (diff) | |
download | psych-483d0d30bf783e04dfdb458b65219281dda76cff.zip |
sequences convert to ruby
Diffstat (limited to 'test')
-rw-r--r-- | test/visitors/test_to_ruby.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/visitors/test_to_ruby.rb b/test/visitors/test_to_ruby.rb index 0d2bbf4..f514178 100644 --- a/test/visitors/test_to_ruby.rb +++ b/test/visitors/test_to_ruby.rb @@ -13,6 +13,14 @@ module Psych assert_equal 'foo', @visitor.accept(scalar) assert_equal 'foo', scalar.to_ruby end + + def test_sequence + seq = Nodes::Sequence.new + seq.children << Nodes::Scalar.new('foo') + seq.children << Nodes::Scalar.new('bar') + + assert_equal %w{ foo bar }, seq.to_ruby + end end end end |