Module: SuperDiff::RSpec::AugmentedMatcher

Defined in:
lib/super_diff/rspec/augmented_matcher.rb

Instance Method Summary collapse

Instance Method Details

#descriptionObject

Update to use expected_for_description instead of @expected TODO: Test



8
9
10
# File 'lib/super_diff/rspec/augmented_matcher.rb', line 8

def description
  matcher_text_builder.matcher_description
end

#diffable?Boolean

Always be diffable (we have the logic of whether to show a diff or not in SuperDiff::RSpec::Differ)

Returns:

  • (Boolean)


24
25
26
# File 'lib/super_diff/rspec/augmented_matcher.rb', line 24

def diffable?
  true
end

#failure_messageObject

Colorize the ‘actual’ value



13
14
15
# File 'lib/super_diff/rspec/augmented_matcher.rb', line 13

def failure_message
  build_failure_message(negated: false)
end

#failure_message_when_negatedObject

Colorize the ‘actual’ value



18
19
20
# File 'lib/super_diff/rspec/augmented_matcher.rb', line 18

def failure_message_when_negated
  build_failure_message(negated: true)
end