spec/flipper/dsl_spec.rb in flipper-0.15.0 vs spec/flipper/dsl_spec.rb in flipper-0.16.0

- old
+ new

@@ -1,8 +1,7 @@ require 'helper' require 'flipper/dsl' -require 'flipper/adapters/memory' RSpec.describe Flipper::DSL do subject { described_class.new(adapter) } let(:adapter) { Flipper::Adapters::Memory.new } @@ -308,9 +307,20 @@ describe '#add' do it 'adds the feature' do expect(subject.features).to eq(Set.new) subject.add(:stats) expect(subject.features).to eq(Set[subject[:stats]]) + end + end + + describe '#exist?' do + it 'returns true if the feature is added in adapter' do + subject.add(:stats) + expect(subject.exist?(:stats)).to be(true) + end + + it 'returns false if the feature is NOT added in adapter' do + expect(subject.exist?(:stats)).to be(false) end end describe '#remove' do it 'removes the feature' do