Sha256: 4c1a4cabf265741ce76414f5b25c2b308be4f0bcc02d466b4df2fb282e2e1ad9

Contents?: true

Size: 370 Bytes

Versions: 70

Compression:

Stored size: 370 Bytes

Contents

class MockedInstrumentationService
  attr_reader :events
  def initialize(event = nil, events = [])
    @events = events
    subscribe event
  end
  def instrument(event, payload = nil)
    payload ||= {}
    res = yield payload
    events << [event, payload, res] if @subscribe == event
    res
  end
  def subscribe(event)
    @subscribe = event
    @events
  end
end

Version data entries

70 entries across 70 versions & 3 rubygems

Version Path
html-pipeline-linuxfr-0.15.7 test/helpers/mocked_instrumentation_service.rb
html-pipeline-linuxfr-0.15.6 test/helpers/mocked_instrumentation_service.rb
html-pipeline-linuxfr-0.15.5 test/helpers/mocked_instrumentation_service.rb
html-pipeline-linuxfr-0.15.4 test/helpers/mocked_instrumentation_service.rb
html-pipeline-linuxfr-0.15.3 test/helpers/mocked_instrumentation_service.rb
html-pipeline-linuxfr-0.14.30 test/helpers/mocked_instrumentation_service.rb
html-pipeline-linuxfr-0.15.2 test/helpers/mocked_instrumentation_service.rb
html-pipeline-linuxfr-0.15.1 test/helpers/mocked_instrumentation_service.rb
html-pipeline-linuxfr-0.14.29 test/helpers/mocked_instrumentation_service.rb
html-pipeline-linuxfr-0.15.0 test/helpers/mocked_instrumentation_service.rb
html-pipeline-linuxfr-0.14.28 test/helpers/mocked_instrumentation_service.rb
html-pipeline-linuxfr-0.14.27 test/helpers/mocked_instrumentation_service.rb
html-pipeline-linuxfr-0.14.26 test/helpers/mocked_instrumentation_service.rb
html-pipeline-2.4.1 test/helpers/mocked_instrumentation_service.rb
html-pipeline-2.4.0 test/helpers/mocked_instrumentation_service.rb
html-pipeline-2.3.0 test/helpers/mocked_instrumentation_service.rb
html-pipeline-2.2.4 test/helpers/mocked_instrumentation_service.rb
html-pipeline-2.2.3 test/helpers/mocked_instrumentation_service.rb
html-pipeline-2.2.2 test/helpers/mocked_instrumentation_service.rb
html-pipeline-2.2.1 test/helpers/mocked_instrumentation_service.rb