Sha256: d2f94addda87ffc15b13f1ba9d836cc89365a5c41820a88a50e8ca283e5346c7
Contents?: true
Size: 830 Bytes
Versions: 13
Compression:
Stored size: 830 Bytes
Contents
require 'rails_helper' module ConfigManager module Toggles describe Set, :redis => true do describe ".active?" do before { definition.type = 'set' } let(:definition) { Definition.new('ut') } context "when the challenge is in the set of acceptable answers" do before { definition.acceptable_values = %w(a b) } it "returns true" do Set.active?(definition, 'b').should be_truthy end end context "when the challenge is not in the set of acceptable answers" do before { definition.acceptable_values = %w(a b) } it "returns false" do Set.active?(definition, 'c').should be_falsy end end context "when there are no acceptable answers" do it "returns false" do Set.active?(definition, 'a').should be_falsy end end end end end end
Version data entries
13 entries across 13 versions & 1 rubygems