Sha256: f0c5623a347bf5d7432eed915f4f4e043a786e998bfebae0e0cc618ed0d9dfe4
Contents?: true
Size: 767 Bytes
Versions: 7
Compression:
Stored size: 767 Bytes
Contents
module Libhoney # For testing use: a mock version of TransmissionClient that retains all # events in an in-memory queue for inspection (and does not send them to # Honeycomb, or perform any network activity). # # @note This class is intended for use in tests, for example if you want to # verify what events your instrumented code is sending. Use in # production is not recommended. class MockTransmissionClient def initialize reset end # @return [Array<Event>] the recorded events attr_reader :events # Records an event def add(event) @events.push(event) end # Does nothing. def close(drain) end # Discards the recorded events def reset @events = [] end end end
Version data entries
7 entries across 7 versions & 1 rubygems