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



6
7
8
# File 'lib/super_diff/rspec/augmented_matcher.rb', line 6

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)


22
23
24
# File 'lib/super_diff/rspec/augmented_matcher.rb', line 22

def diffable?
  true
end

#failure_messageObject

Colorize the ‘actual’ value



11
12
13
# File 'lib/super_diff/rspec/augmented_matcher.rb', line 11

def failure_message
  build_failure_message(negated: false)
end

#failure_message_when_negatedObject

Colorize the ‘actual’ value



16
17
18
# File 'lib/super_diff/rspec/augmented_matcher.rb', line 16

def failure_message_when_negated
  build_failure_message(negated: true)
end