Sha256: cee70cce5b7186fee1a57f4257386e2574efeedad62a4586bab153e98b8e3a43
Contents?: true
Size: 777 Bytes
Versions: 29
Compression:
Stored size: 777 Bytes
Contents
require 'libhoney/client' require 'libhoney/mock_transmission' module Libhoney # A client with the network stubbed out for testing purposes. Does not # actually send any events to Honeycomb; instead, records events for later # inspection. # # @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 TestClient < Client def initialize(*args, **kwargs) super(*args, transmission: MockTransmissionClient.new, **kwargs) end # @return [Array<Event>] the recorded events def events @transmission.events end # Discards the recorded events def reset @transmission.reset end end end
Version data entries
29 entries across 29 versions & 1 rubygems