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-1.3.2 spec/flipper/instrumenters/noop_spec.rb
flipper-1.3.1 spec/flipper/instrumenters/noop_spec.rb
flipper-1.3.0 spec/flipper/instrumenters/noop_spec.rb
flipper-1.3.0.pre spec/flipper/instrumenters/noop_spec.rb
flipper-1.2.2 spec/flipper/instrumenters/noop_spec.rb
flipper-1.2.1 spec/flipper/instrumenters/noop_spec.rb
flipper-1.2.0 spec/flipper/instrumenters/noop_spec.rb
flipper-1.1.2 spec/flipper/instrumenters/noop_spec.rb
flipper-1.1.1 spec/flipper/instrumenters/noop_spec.rb
flipper-1.1.0 spec/flipper/instrumenters/noop_spec.rb
flipper-1.0.0 spec/flipper/instrumenters/noop_spec.rb
flipper-1.0.0.pre spec/flipper/instrumenters/noop_spec.rb
flipper-0.28.3 spec/flipper/instrumenters/noop_spec.rb
flipper-0.28.2 spec/flipper/instrumenters/noop_spec.rb
flipper-0.28.1 spec/flipper/instrumenters/noop_spec.rb
flipper-0.28.0 spec/flipper/instrumenters/noop_spec.rb
flipper-0.27.1 spec/flipper/instrumenters/noop_spec.rb
flipper-0.27.0 spec/flipper/instrumenters/noop_spec.rb
flipper-0.26.2 spec/flipper/instrumenters/noop_spec.rb
flipper-0.26.1 spec/flipper/instrumenters/noop_spec.rb