spec/flipper/dsl_spec.rb in flipper-0.11.0.beta6 vs spec/flipper/dsl_spec.rb in flipper-0.11.0.beta7
- old
+ new
@@ -272,16 +272,34 @@
expect(subject[:stats].percentage_of_time_value).to be(6)
subject.disable_percentage_of_time(:stats)
expect(subject[:stats].percentage_of_time_value).to be(0)
end
+
+ it 'can enable/disable float values' do
+ expect(subject[:stats].percentage_of_time_value).to be(0)
+ subject.enable_percentage_of_time(:stats, 0.01)
+ expect(subject[:stats].percentage_of_time_value).to be(0.01)
+
+ subject.disable_percentage_of_time(:stats)
+ expect(subject[:stats].percentage_of_time_value).to be(0)
+ end
end
describe '#enable_percentage_of_actors/disable_percentage_of_actors' do
it 'enables and disables the feature for percentage of time' do
expect(subject[:stats].percentage_of_actors_value).to be(0)
subject.enable_percentage_of_actors(:stats, 6)
expect(subject[:stats].percentage_of_actors_value).to be(6)
+
+ subject.disable_percentage_of_actors(:stats)
+ expect(subject[:stats].percentage_of_actors_value).to be(0)
+ end
+
+ it 'can enable/disable float values' do
+ expect(subject[:stats].percentage_of_actors_value).to be(0)
+ subject.enable_percentage_of_actors(:stats, 0.01)
+ expect(subject[:stats].percentage_of_actors_value).to be(0.01)
subject.disable_percentage_of_actors(:stats)
expect(subject[:stats].percentage_of_actors_value).to be(0)
end
end