Sha256: 36cf2ddda99b24bc91db9b5c9012eeee6cb55949ec7b6e7b74f0ec4a189299f1

Contents?: true

Size: 623 Bytes

Versions: 14

Compression:

Stored size: 623 Bytes

Contents

require "spec_helper"

describe Flip do

  before(:all) do
    Class.new do
      extend Flip::Declarable
      strategy Flip::DeclarationStrategy
      default false
      feature :one, default: true
      feature :two, default: false
    end
  end

  after(:all) do
    Flip.reset
  end

  describe ".on?" do
    it "returns true for enabled features" do
      Flip.on?(:one).should be_true
    end
    it "returns false for disabled features" do
      Flip.on?(:two).should be_false
    end
  end

  describe "dynamic predicate methods" do
    its(:one?) { should be_true }
    its(:two?) { should be_false }
  end

end

Version data entries

14 entries across 14 versions & 2 rubygems

Version Path
flip-1.0.1 spec/flip_spec.rb
flip-1.0.0 spec/flip_spec.rb
flip-0.2.1 spec/flip_spec.rb
flip-0.2.0 spec/flip_spec.rb
flip_fork-0.2.0 spec/flip_spec.rb
flip_fork-0.1.1 spec/flip_spec.rb
flip_fork-0.1.0 spec/flip_spec.rb
flip-0.1.0 spec/flip_spec.rb
flip-0.0.4 spec/flip_spec.rb
flip-0.0.3 spec/flip_spec.rb
flip-0.0.2 spec/flip_spec.rb
flip-0.0.1 spec/flip_spec.rb
flip-0.0.1.alpha2 spec/flip_spec.rb
flip-0.0.1.alpha spec/flip_spec.rb