Sha256: f62b57f939af34b6f97f0a3055e23850e20e61331ec6b6a9daa7509ca4eebf04
Contents?: true
Size: 552 Bytes
Versions: 38
Compression:
Stored size: 552 Bytes
Contents
module Marshal class << self # Duplicates any mock objects before serialization. Otherwise, # serialization will fail because methods exist on the singleton class. def dump_with_mocks(object, *rest) if ::RSpec::Mocks.space.nil? || !::RSpec::Mocks.space.registered?(object) || NilClass === object dump_without_mocks(object, *rest) else dump_without_mocks(object.dup, *rest) end end alias_method :dump_without_mocks, :dump undef_method :dump alias_method :dump, :dump_with_mocks end end
Version data entries
38 entries across 38 versions & 10 rubygems