Sha256: 09d3adc36ee6e3be08da18d19bfe7bfe1159f9b39a354739e9a9feaefc59cccd
Contents?: true
Size: 733 Bytes
Versions: 12
Compression:
Stored size: 733 Bytes
Contents
require 'helper' require 'flipper/instrumenters/memory' RSpec.describe Flipper::Instrumenters::Memory do describe "#initialize" do it "sets events to empty array" do instrumenter = described_class.new expect(instrumenter.events).to eq([]) end end describe "#instrument" do it "adds to events" do instrumenter = described_class.new name = 'user.signup' payload = {:email => 'john@doe.com'} block_result = :yielded result = instrumenter.instrument(name, payload) { block_result } expect(result).to eq(block_result) event = described_class::Event.new(name, payload, block_result) expect(instrumenter.events).to eq([event]) end end end
Version data entries
12 entries across 12 versions & 1 rubygems