From 483d0d30bf783e04dfdb458b65219281dda76cff Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Mon, 28 Sep 2009 11:51:09 -0700 Subject: sequences convert to ruby --- test/visitors/test_to_ruby.rb | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'test/visitors/test_to_ruby.rb') 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 -- cgit v1.2.3