Module: JetstreamBridge::TestHelpers::Matchers

Defined in:
lib/jetstream_bridge/test_helpers/matchers.rb

Overview

RSpec matchers for asserting publish outcomes and captured events.

Defined Under Namespace

Classes: BePublishFailure, BePublishSuccess, HavePublished

Instance Method Summary collapse

Instance Method Details

#be_publish_failureObject

Matcher for checking publish result failure



79
80
81
# File 'lib/jetstream_bridge/test_helpers/matchers.rb', line 79

def be_publish_failure
  BePublishFailure.new
end

#be_publish_successObject

Matcher for checking publish result success



60
61
62
# File 'lib/jetstream_bridge/test_helpers/matchers.rb', line 60

def be_publish_success
  BePublishSuccess.new
end

#have_published(event_type:, payload: {}) ⇒ HavePublished

Matcher for checking if an event was published



12
13
14
# File 'lib/jetstream_bridge/test_helpers/matchers.rb', line 12

def have_published(event_type:, payload: {})
  HavePublished.new(event_type, payload)
end