Class: RubyEventStore::RSpec::MatchEvents

Inherits:
Object
  • Object
show all
Defined in:
lib/ruby_event_store/rspec/match_events.rb

Instance Method Summary collapse

Instance Method Details

#call(expected, events) ⇒ Object


4
5
6
7
8
9
10
# File 'lib/ruby_event_store/rspec/match_events.rb', line 4

def call(expected, events)
  if match_events?(expected)
    matcher(expected).matches?(events) && matches_count?(expected, events)
  else
    !events.empty?
  end
end