Sha256: 325d59697c4714ee04135216d54a09849af9a73bedd1290c42aded61cfe25469
Contents?: true
Size: 788 Bytes
Versions: 13
Compression:
Stored size: 788 Bytes
Contents
require 'rails_helper' module ConfigManager module Toggles describe Boolean, :redis => true do describe ".active?" do before { definition.type = 'boolean' } let(:definition) { Definition.new('ut') } context "when the acceptable answer is true" do before { definition.acceptable_values = true } it "returns true" do Boolean.active?(definition).should be_truthy end end context "when the acceptable answer is false" do before { definition.acceptable_values = false } it "returns false" do Boolean.active?(definition).should be_falsy end end context "when the acceptable answer is not set" do it "returns false" do Boolean.active?(definition).should be_falsy end end end end end end
Version data entries
13 entries across 13 versions & 1 rubygems