Sha256: e490bf387df1a9a0f8e2ad736b1d5ca75c62938ccfa9dd283c09f4039bc721f5

Contents?: true

Size: 579 Bytes

Versions: 27

Compression:

Stored size: 579 Bytes

Contents

require 'psych/helper'
require 'psych/handlers/recorder'

module Psych
  module Handlers
    class TestRecorder < TestCase
      def test_replay
        yaml   = "--- foo\n...\n"
        output = StringIO.new

        recorder = Psych::Handlers::Recorder.new
        parser   = Psych::Parser.new recorder
        parser.parse yaml

        assert_equal 5, recorder.events.length

        emitter = Psych::Emitter.new output
        recorder.events.each do |m, args|
          emitter.send m, *args
        end
        assert_equal yaml, output.string
      end
    end
  end
end

Version data entries

27 entries across 27 versions & 2 rubygems

Version Path
psych-2.0.17-java test/psych/handlers/test_recorder.rb
psych-2.0.17 test/psych/handlers/test_recorder.rb
psych-2.0.16-java test/psych/handlers/test_recorder.rb
psych-2.0.16 test/psych/handlers/test_recorder.rb
psych-2.0.15-java test/psych/handlers/test_recorder.rb
psych-2.0.15 test/psych/handlers/test_recorder.rb
psych-2.0.14-java test/psych/handlers/test_recorder.rb
psych-2.0.14 test/psych/handlers/test_recorder.rb
psych-shopifork-2.0.13 test/psych/handlers/test_recorder.rb
psych-2.0.14.pre1-java test/psych/handlers/test_recorder.rb
psych-2.0.13 test/psych/handlers/test_recorder.rb
psych-2.0.12 test/psych/handlers/test_recorder.rb
psych-2.0.11 test/psych/handlers/test_recorder.rb
psych-2.0.10 test/psych/handlers/test_recorder.rb
psych-2.0.9 test/psych/handlers/test_recorder.rb
psych-2.0.8 test/psych/handlers/test_recorder.rb
psych-2.0.7 test/psych/handlers/test_recorder.rb
psych-2.0.6 test/psych/handlers/test_recorder.rb
psych-shopifork-2.0.5 test/psych/handlers/test_recorder.rb
psych-2.0.5 test/psych/handlers/test_recorder.rb