summaryrefslogtreecommitdiff
path: root/test/visitors/test_to_ruby.rb
blob: 8cd29ace9c1a7a35b82449601c793f72e682795c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
require 'minitest/autorun'
require 'psych'

module Psych
  module Visitors
    class TestToRuby < MiniTest::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