Sha256: 76b6cf992e2430704df3c7fe639a11087ed024bedc3bd5f84f8841a93573d438
Contents?: true
Size: 652 Bytes
Versions: 4
Compression:
Stored size: 652 Bytes
Contents
require 'flipper/adapters/redis' RSpec.describe Flipper::Adapters::Redis do let(:client) do options = {} options[:url] = ENV['REDIS_URL'] if ENV['REDIS_URL'] Redis.new(options) end subject { described_class.new(client) } before do begin client.flushdb rescue Redis::CannotConnectError ENV['CI'] ? raise : skip('Redis not available') end end it_should_behave_like 'a flipper adapter' it 'configures itself on load' do Flipper.configuration = nil Flipper.instance = nil load 'flipper/adapters/redis.rb' expect(Flipper.adapter.adapter).to be_a(Flipper::Adapters::Redis) end end
Version data entries
4 entries across 4 versions & 1 rubygems