Sha256: 1aec1f561eb7e916f64bd562dc62fc86e34a9e7e9ebe747c737516fafd1df398

Contents?: true

Size: 668 Bytes

Versions: 32

Compression:

Stored size: 668 Bytes

Contents

RSpec.describe Flipper::Instrumenters::Noop do
  describe '.instrument' do
    context 'with name' do
      it 'yields block' do
        expect { |block|
          described_class.instrument(:foo, &block)
        }.to yield_control
      end
    end

    context 'with name and payload' do
      let(:payload) { { pay: :load } }

      it 'yields block' do
        expect { |block|
          described_class.instrument(:foo, payload, &block)
        }.to yield_control
      end

      it 'yields the payload' do
        described_class.instrument(:foo, payload) do |block_payload|
          expect(block_payload).to eq payload
        end
      end
    end
  end
end

Version data entries

32 entries across 32 versions & 1 rubygems

Version Path
flipper-0.26.0 spec/flipper/instrumenters/noop_spec.rb
flipper-0.26.0.rc2 spec/flipper/instrumenters/noop_spec.rb
flipper-0.26.0.rc1 spec/flipper/instrumenters/noop_spec.rb
flipper-0.25.4 spec/flipper/instrumenters/noop_spec.rb
flipper-0.25.3 spec/flipper/instrumenters/noop_spec.rb
flipper-0.25.2 spec/flipper/instrumenters/noop_spec.rb
flipper-0.25.1 spec/flipper/instrumenters/noop_spec.rb
flipper-0.25.0 spec/flipper/instrumenters/noop_spec.rb
flipper-0.24.1 spec/flipper/instrumenters/noop_spec.rb
flipper-0.24.0 spec/flipper/instrumenters/noop_spec.rb
flipper-0.23.1 spec/flipper/instrumenters/noop_spec.rb
flipper-0.23.0 spec/flipper/instrumenters/noop_spec.rb