module Minitest::Assertions

def things_to_diff exp, act

def things_to_diff exp, act
  expect = mu_pp_for_diff exp
  butwas = mu_pp_for_diff act
  e1, e2 = expect.include?("\n"), expect.include?("\\n")
  b1, b2 = butwas.include?("\n"), butwas.include?("\\n")
  need_to_diff =
    (e1 ^ e2                  ||
     b1 ^ b2                  ||
     expect.size > 30         ||
     butwas.size > 30         ||
     expect == butwas)        &&
    Minitest::Assertions.diff
  need_to_diff && [expect, butwas]
end