spec/rollout_spec.rb in rollout-2.0.0a vs spec/rollout_spec.rb in rollout-2.0.0b

- old
+ new

@@ -38,20 +38,22 @@ describe "deactivating a group" do before do @rollout.define_group(:fivesonly) { |user| user.id == 5 } @rollout.activate_group(:chat, :all) + @rollout.activate_group(:chat, :some) @rollout.activate_group(:chat, :fivesonly) @rollout.deactivate_group(:chat, :all) + @rollout.deactivate_group(:chat, "some") end it "deactivates the rules for that group" do @rollout.should_not be_active(:chat, stub(:id => 10)) end it "leaves the other groups active" do - @rollout.should be_active(:chat, stub(:id => 5)) + @rollout.get(:chat).groups.should == [:fivesonly] end end describe "deactivating a feature completely" do before do @@ -96,19 +98,21 @@ end describe "deactivating a specific user" do before do @rollout.activate_user(:chat, stub(:id => 42)) + @rollout.activate_user(:chat, stub(:id => 4242)) @rollout.activate_user(:chat, stub(:id => 24)) @rollout.deactivate_user(:chat, stub(:id => 42)) + @rollout.deactivate_user(:chat, stub(:id => "4242")) end it "that user should no longer be active" do @rollout.should_not be_active(:chat, stub(:id => 42)) end it "remains active for other active users" do - @rollout.should be_active(:chat, stub(:id => 24)) + @rollout.get(:chat).users.should == [24] end end describe "activating a feature globally" do before do