class RubyEventStore::RSpec::CrudeFailureMessageFormatter::Apply

Public Instance Methods

failure_message(expected, applied_events) click to toggle source
# File lib/ruby_event_store/rspec/crude_failure_message_formatter.rb, line 80
        def failure_message(expected, applied_events)
          if !expected.empty?
            <<~EOS
            expected block to have applied:

            #{expected.events}

            but applied:

            #{applied_events}
            EOS
          else
            "expected block to have applied any events"
          end
        end
failure_message_when_negated(expected, applied_events) click to toggle source
# File lib/ruby_event_store/rspec/crude_failure_message_formatter.rb, line 96
        def failure_message_when_negated(expected, applied_events)
          if !expected.empty?
            <<~EOS
            expected block not to have applied:

            #{expected.events}

            but applied:

            #{applied_events}
            EOS
          else
            "expected block not to have applied any events"
          end
        end