Class: SuperDiff::RSpec::Differ

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

Defined Under Namespace

Classes: RSpecHelpers

Instance Method Summary collapse

Instance Method Details

#diffObject



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

def diff
  if worth_diffing?
    diff = SuperDiff.diff(expected, actual)
    "\n\n#{diff}"
  else
    ''
  end
rescue Core::NoDifferAvailableError
  ''
end