class LogMessageHandler
Public Class Methods
has_received_a_message_with_routing_key?(routing_key)
click to toggle source
# File lib/gorg_service/rspec/log_message_handler.rb, line 23 def self.has_received_a_message_with_routing_key?(routing_key) messages.any?{|m| m.routing_key==routing_key} end
has_received_error?(type)
click to toggle source
# File lib/gorg_service/rspec/log_message_handler.rb, line 11 def self.has_received_error?(type) messages.any?{|m| m.errors.any?{|x| x.type==type}} || messages.any?{|m| m.type=='log'&&m.error_type=type} end
has_received_hardfail?()
click to toggle source
# File lib/gorg_service/rspec/log_message_handler.rb, line 15 def self.has_received_hardfail? self.has_received_error?("hardfail") end
has_received_softfail?()
click to toggle source
# File lib/gorg_service/rspec/log_message_handler.rb, line 19 def self.has_received_softfail? self.has_received_error?("softfail") end
messages()
click to toggle source
# File lib/gorg_service/rspec/log_message_handler.rb, line 7 def self.messages @@messages||=[] end
new(msg)
click to toggle source
# File lib/gorg_service/rspec/log_message_handler.rb, line 2 def initialize(msg) GorgService.logger.debug "Message received in LogMessageHandler" self.class.messages<<msg end
reset()
click to toggle source
# File lib/gorg_service/rspec/log_message_handler.rb, line 27 def self.reset @@messages=nil end