Permalink
Browse files

Tweak percentage of actor specs based on hashing of id change.

  • Loading branch information...
1 parent 47613b8 commit a251bae22c8b27e8abf333d81f3b795f65afafaf @jnunemaker committed Nov 14, 2012
Showing with 5 additions and 8 deletions.
  1. +5 −8 spec/integration_spec.rb
View
@@ -121,7 +121,6 @@ def enable_percentage_of_random(percentage)
it "enables feature for actor within percentage" do
enabled = (1..100).select { |i| subject.enabled?(Flipper::Types::Actor.new(i)) }.length
-
enabled.should be_within(2).of(5)
end
@@ -189,7 +188,8 @@ def enable_percentage_of_random(percentage)
end
it "disables actor in percentage of actors" do
- subject.enabled?(pitt).should be_false
+ enabled = (1..100).select { |i| subject.enabled?(Flipper::Types::Actor.new(i)) }.length
+ enabled.should be(0)
end
it "disables percentage of random" do
@@ -254,12 +254,9 @@ def enable_percentage_of_random(percentage)
subject.disable(five_percent_of_actors)
end
- it "disables feature for actor within percentage" do
- subject.enabled?(pitt).should be_false
- end
-
- it "disables feature for actors not within percentage" do
- subject.enabled?(clooney).should be_false
+ it "disables feature" do
+ enabled = (1..100).select { |i| subject.enabled?(Flipper::Types::Actor.new(i)) }.length
+ enabled.should be(0)
end
it "adds feature to set of features" do

0 comments on commit a251bae

Please sign in to comment.