class RSpec::Support::Differ

def hash_to_string(hash)

def hash_to_string(hash)
  formatted_hash = ObjectFormatter.prepare_for_inspection(hash)
  formatted_hash.keys.sort_by { |k| k.to_s }.map do |key|
    pp_key   = PP.singleline_pp(key, "".dup)
    pp_value = PP.singleline_pp(formatted_hash[key], "".dup)
    "#{pp_key} => #{pp_value},"
  end.join("\n")
end