Permalink
Browse files

Require that adapters include a module as well.

  • Loading branch information...
1 parent fab7095 commit ae1a991e564554f8de27121073cb35de6a1916f6 @jnunemaker committed Feb 16, 2013
View
@@ -64,6 +64,7 @@ def self.groups=(registry)
end
end
+require 'flipper/adapter'
require 'flipper/dsl'
require 'flipper/errors'
require 'flipper/feature'
@@ -0,0 +1,5 @@
+module Flipper
+ module Adapter
+ # adding a module include so we have some hooks for stuff down the road
+ end
+end
@@ -3,6 +3,7 @@
module Flipper
module Adapters
class Decorator < ::Flipper::Decorator
+ include Flipper::Adapter
end
end
end
@@ -3,6 +3,8 @@
module Flipper
module Adapters
class Memory
+ include Flipper::Adapter
+
FeaturesKey = :flipper_features
# Public: The name of the adapter.
@@ -31,6 +31,10 @@
subject.name.should be_instance_of(Symbol)
end
+ it "has included the flipper adapter module" do
+ subject.class.ancestors.should include(Flipper::Adapter)
+ end
+
it "returns correct default values for the gates if none are enabled" do
subject.get(feature).should eq({
:boolean => nil,

0 comments on commit ae1a991

Please sign in to comment.