Class: SuperDiff::RSpec::Differ

Inherits:
Object
  • Object
show all
Defined in:
lib/super_diff/rspec/differ.rb

Defined Under Namespace

Classes: Helpers

Instance Method Summary collapse

Instance Method Details

#diffObject



8
9
10
11
12
13
14
15
16
17
18
# File 'lib/super_diff/rspec/differ.rb', line 8

def diff
  if worth_diffing?
    diff =
      SuperDiff::Differs::Main.call(expected, actual, omit_empty: true)
    "\n\n" + diff
  else
    ""
  end
rescue SuperDiff::Errors::NoDifferAvailableError
  ""
end