Sha256: 512b4f005268167dceb71a8a10b184934a20bf2ebecf312cddb8af58e4654a5e

Contents?: true

Size: 349 Bytes

Versions: 27

Compression:

Stored size: 349 Bytes

Contents

require_relative 'helper'

module Psych
  class TestNil < TestCase
    def test_nil
      yml = Psych.dump nil
      assert_match(/--- \n(?:\.\.\.\n)?/, yml)
      assert_nil Psych.load(yml)
    end

    def test_array_nil
      yml = Psych.dump [nil]
      assert_equal "---\n- \n", yml
      assert_equal [nil], Psych.load(yml)
    end

  end
end

Version data entries

27 entries across 27 versions & 2 rubygems

Version Path
psych-2.0.4 test/psych/test_nil.rb
psych-shopifork-2.0.3 test/psych/test_nil.rb
psych-2.0.3 test/psych/test_nil.rb
psych-2.0.2 test/psych/test_nil.rb
psych-shopifork-2.0.0 test/psych/test_nil.rb
psych-2.0.1 test/psych/test_nil.rb
psych-2.0.0 test/psych/test_nil.rb