summaryrefslogtreecommitdiff
path: root/test/visitors/test_to_ruby.rb
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2009-09-28 10:58:10 -0700
committerAaron Patterson <aaron.patterson@gmail.com>2009-09-28 10:58:28 -0700
commitf3fcb96084fd7edf69bcd23e7d1dd3887794858c (patch)
treea74e5a17a67ff3871793fba8856324a41d029c9f /test/visitors/test_to_ruby.rb
parentccacb1f69c1097d42a4171fc39111b89b65d7d54 (diff)
downloadpsych-f3fcb96084fd7edf69bcd23e7d1dd3887794858c.zip
moving constants around, starting the to_ruby visitor
Diffstat (limited to 'test/visitors/test_to_ruby.rb')
-rw-r--r--test/visitors/test_to_ruby.rb16
1 files changed, 16 insertions, 0 deletions
diff --git a/test/visitors/test_to_ruby.rb b/test/visitors/test_to_ruby.rb
new file mode 100644
index 0000000..aa98fbb
--- /dev/null
+++ b/test/visitors/test_to_ruby.rb
@@ -0,0 +1,16 @@
+require 'helper'
+
+module Psych
+ module Visitors
+ class TestToRuby < Test::Unit::TestCase
+ def setup
+ @visitor = ToRuby.new
+ end
+
+ def test_scalar
+ scalar = Nodes::Scalar.new('foo')
+ assert_equal 'foo', @visitor.accept(scalar)
+ end
+ end
+ end
+end