Class: JetstreamBridge::TestHelpers::Matchers::BePublishFailure

Inherits:
Object
  • Object
show all
Defined in:
lib/jetstream_bridge/test_helpers/matchers.rb

Instance Method Summary collapse

Instance Method Details

#failure_messageObject



88
89
90
# File 'lib/jetstream_bridge/test_helpers/matchers.rb', line 88

def failure_message
  'expected PublishResult to be a failure but it succeeded'
end

#failure_message_when_negatedObject



92
93
94
# File 'lib/jetstream_bridge/test_helpers/matchers.rb', line 92

def failure_message_when_negated
  'expected PublishResult to not be a failure but it was'
end

#matches?(actual) ⇒ Boolean



84
85
86
# File 'lib/jetstream_bridge/test_helpers/matchers.rb', line 84

def matches?(actual)
  actual.respond_to?(:failure?) && actual.failure?
end