Sha256: 7eda4791329b192ab12207cb7c6dc13eced0c7da473da3121430f802df0c1f35

Contents?: true

Size: 398 Bytes

Versions: 2

Compression:

Stored size: 398 Bytes

Contents

# frozen_string_literal: true

require 'awesome_print'

module RSpec
  module Snapshot
    # Serializes values in a human readable way for snapshots using the
    # awesome_print gem
    class DefaultSerializer
      # @param [*] value The value to serialize.
      # @return [String] The serialized value.
      def dump(value)
        value.ai(plain: true, indent: 2)
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
rspec-snapshot-2.0.3 lib/rspec/snapshot/default_serializer.rb
rspec-snapshot-2.0.2 lib/rspec/snapshot/default_serializer.rb