spec/user_spec.rb in split-3.3.2 vs spec/user_spec.rb in split-3.4.0

- old
+ new

@@ -57,9 +57,20 @@ @subject.cleanup_old_experiments! expect(@subject.keys).to include("link_color") expect(@subject.keys).to include("link_color:finished") end end + + context 'when already cleaned up' do + before do + @subject.cleanup_old_experiments! + end + + it 'does not clean up again' do + expect(@subject).to_not receive(:keys_without_finished) + @subject.cleanup_old_experiments! + end + end end context "instantiated with custom adapter" do let(:custom_adapter) { double(:persistence_adapter) }