spec/persistence/redis_adapter_spec.rb in split-1.0.0 vs spec/persistence/redis_adapter_spec.rb in split-1.1.0

- old
+ new

@@ -14,9 +14,18 @@ expect{Split::Persistence::RedisAdapter.new(context) }.to raise_error end end + context 'config with key' do + before { Split::Persistence::RedisAdapter.reset_config! } + subject { Split::Persistence::RedisAdapter.new(context, 'manual') } + + it 'should be "persistence:manual"' do + expect(subject.redis_key).to eq('persistence:manual') + end + end + context 'config with lookup_by = proc { "block" }' do before { Split::Persistence::RedisAdapter.with_config(:lookup_by => proc{'block'}) } it 'should be "persistence:block"' do expect(subject.redis_key).to eq('persistence:block')