spec/flipper/cloud_spec.rb in flipper-cloud-0.11.0.beta7 vs spec/flipper/cloud_spec.rb in flipper-cloud-0.11.0.beta8
- old
+ new
@@ -59,13 +59,14 @@
instance = described_class.new('asdf', instrumenter: instrumenter)
expect(instance.instrumenter).to be(instrumenter)
end
it 'allows wrapping adapter with another adapter like the instrumenter' do
- adapter_wrapper = lambda do |adapter|
- Flipper::Adapters::Instrumented.new(adapter)
+ instance = described_class.new('asdf') do |config|
+ config.adapter do |adapter|
+ Flipper::Adapters::Instrumented.new(adapter)
+ end
end
- instance = described_class.new('asdf', adapter_wrapper: adapter_wrapper)
# instance.adapter is memoizable adapter instance
expect(instance.adapter.adapter).to be_instance_of(Flipper::Adapters::Instrumented)
end
it 'can set debug_output' do