require "spec_helper" class TestableFlipModel extend Flip::Declarable strategy Flip::DeclarationStrategy default false feature :one feature :two, description: "Second one." feature :three, default: true end describe Flip::Declarable do let(:model_class) { TestableFlipModel } subject { Flip::FeatureSet.instance } describe "the .on? class method" do context "with default set to false" do it { should_not be_on(:one) } it { should be_on(:three) } end context "with default set to true" do before(:all) { model_class.send(:default, true) } it { should be_on(:one) } it { should be_on(:three) } end end end