Class: RubyEventStore::RSpec::BeEvent::FailureMessage::Diff
- Inherits:
-
Object
- Object
- RubyEventStore::RSpec::BeEvent::FailureMessage::Diff
- Defined in:
- lib/ruby_event_store/rspec/be_event.rb
Instance Method Summary collapse
-
#initialize(actual, expected, label, differ:) ⇒ Diff
constructor
A new instance of Diff.
- #to_s ⇒ Object
Constructor Details
#initialize(actual, expected, label, differ:) ⇒ Diff
Returns a new instance of Diff.
85 86 87 88 89 90 |
# File 'lib/ruby_event_store/rspec/be_event.rb', line 85 def initialize(actual, expected, label, differ:) @actual = actual @expected = expected @label = label @differ = differ end |
Instance Method Details
#to_s ⇒ Object
92 93 94 |
# File 'lib/ruby_event_store/rspec/be_event.rb', line 92 def to_s @expected && ["\n#{@label} diff:", @differ.diff(@actual.to_s + "\n", @expected.to_s)] end |