class Pact::MultipartFormDiffer
Public Class Methods
call(expected, actual, options = {})
click to toggle source
# File lib/pact/shared/multipart_form_differ.rb, line 6 def self.call expected, actual, options = {} require 'pact/matchers' # avoid recursive loop between this file and pact/matchers expected_boundary = expected.split.first actual_boundary = actual.split.first actual_with_hardcoded_boundary = actual.gsub(actual_boundary, expected_boundary) TextDiffer.call(expected, actual_with_hardcoded_boundary, options) rescue StandardError TextDiffer.call(expected, actual, options) end