Class: SuperDiff::EqualityMatchers::MultilineString
- Defined in:
- lib/super_diff/equality_matchers/multiline_string.rb
Class Method Summary collapse
Instance Method Summary collapse
Methods inherited from Base
Class Method Details
.applies_to?(value) ⇒ Boolean
4 5 6 |
# File 'lib/super_diff/equality_matchers/multiline_string.rb', line 4 def self.applies_to?(value) value.is_a?(::String) && value.include?("\n") end |
Instance Method Details
#fail ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/super_diff/equality_matchers/multiline_string.rb', line 8 def fail <<~OUTPUT.strip Differing strings. #{ # TODO: This whole thing should not be red or green, just the values Helpers.style( :expected, "Expected: " + SuperDiff.inspect_object(expected, as_lines: false) ) } #{ Helpers.style( :actual, " Actual: " + SuperDiff.inspect_object(actual, as_lines: false) ) } Diff: #{diff} OUTPUT end |