Module: RubyEventStore::RSpec::Matchers

Defined in:
lib/ruby_event_store/rspec/matchers.rb

Defined Under Namespace

Classes: ListPhraser

Instance Method Summary collapse

Instance Method Details

#apply(*expected) ⇒ Object



57
58
59
# File 'lib/ruby_event_store/rspec/matchers.rb', line 57

def apply(*expected)
  Apply.new(*expected, failure_message_formatter: RSpec.default_formatter.apply(differ))
end

#be_an_event(expected) ⇒ Object Also known as: be_event, an_event, event



26
27
28
# File 'lib/ruby_event_store/rspec/matchers.rb', line 26

def be_an_event(expected)
  BeEvent.new(expected, differ: differ, formatter: formatter)
end

#have_applied(*expected) ⇒ Object



41
42
43
44
45
46
47
# File 'lib/ruby_event_store/rspec/matchers.rb', line 41

def have_applied(*expected)
  HaveApplied.new(
    *expected,
    phraser: phraser,
    failure_message_formatter: RSpec.default_formatter.have_applied(differ)
  )
end

#have_published(*expected) ⇒ Object



33
34
35
36
37
38
39
# File 'lib/ruby_event_store/rspec/matchers.rb', line 33

def have_published(*expected)
  HavePublished.new(
    *expected,
    phraser: phraser,
    failure_message_formatter: RSpec.default_formatter.have_published(differ)
  )
end

#have_subscribed_to_events(*expected) ⇒ Object



49
50
51
# File 'lib/ruby_event_store/rspec/matchers.rb', line 49

def have_subscribed_to_events(*expected)
  HaveSubscribedToEvents.new(*expected, differ: differ, phraser: phraser)
end

#publish(*expected) ⇒ Object



53
54
55
# File 'lib/ruby_event_store/rspec/matchers.rb', line 53

def publish(*expected)
  Publish.new(*expected, failure_message_formatter: RSpec.default_formatter.publish(differ))
end