Sha256: 3cb0a5c5651d0b866a9cbb243553e0d1764beb478ef59d46ca0d749edf59ae2b
Contents?: true
Size: 726 Bytes
Versions: 10
Compression:
Stored size: 726 Bytes
Contents
# rubocop:disable Metrics/AbcSize class RSpec::Httpd::ExpectationFailed < RuntimeError attr_reader :original_error, :response def initialize(original_error, response:) @original_error, @response = original_error, response end def request response.request end def to_s parts = [] parts.push(original_error.to_s) parts.push("=== #{request} =====================") parts.push("> " + request.body.gsub("\n", "\n> ")) if request.body parts.push("--- response ------------------------------------") parts.push("< " + response.body.gsub("\n", "\n< ")) if response.body parts.push("==================================================================") parts.join("\n") end end
Version data entries
10 entries across 10 versions & 1 rubygems