Permalink
Browse files

Set groups to new registry where needed.

  • Loading branch information...
1 parent 46f1c66 commit 77ffb591059486388c142cabfcfe68d650e4ba85 @jnunemaker committed Aug 2, 2012
Showing with 7 additions and 1 deletion.
  1. +1 −0 spec/flipper/dsl_spec.rb
  2. +2 −0 spec/flipper/feature_spec.rb
  3. +4 −0 spec/flipper_spec.rb
  4. +0 −1 spec/helper.rb
View
@@ -11,6 +11,7 @@
before do
source.clear
+ Flipper.groups = Flipper::Registry.new
end
def feature(name)
@@ -28,6 +28,8 @@
let(:percentage_of_random_key) { Flipper::Gates::PercentageOfRandom::Key }
before do
+ Flipper.groups = Flipper::Registry.new
+
Flipper.register(:admins) { |thing| thing.admin? }
Flipper.register(:devs) { |thing| thing.dev? }
View
@@ -1,6 +1,10 @@
require 'helper'
describe Flipper do
+ before do
+ Flipper.groups = Flipper::Registry.new
+ end
+
describe ".groups" do
it "returns a registry instance" do
Flipper.groups.should be_instance_of(Flipper::Registry)
View
@@ -24,7 +24,6 @@
config.run_all_when_everything_filtered = true
config.before(:each) do
- Flipper.groups = Flipper::Registry.new
Timecop.return
end
end

0 comments on commit 77ffb59

Please sign in to comment.