Sha256: b196d4667af206468424a01202804e160c036b8d10021446635b35fca214c88c
Contents?: true
Size: 1.19 KB
Versions: 3
Compression:
Stored size: 1.19 KB
Contents
# frozen_string_literal: true describe Sail, type: :lib do describe ".get" do subject { described_class.get("name") } it "delegates to setting" do expect(Sail::Setting).to receive(:get).with("name") subject end it "allows using settings in block format" do allow(Sail::Setting).to receive(:get).with("name").and_return("something") described_class.get("name") do |setting_value| expect(setting_value).to eq("something") end end end describe ".set" do subject { described_class.set("name", "value") } it "delegates to setting" do expect(Sail::Setting).to receive(:set).with("name", "value") subject end end describe ".switcher" do subject { described_class.switcher(positive: "positive", negative: "negative", throttled_by: "throttle") } it "delegates to setting" do expect(Sail::Setting).to receive(:switcher).with(positive: "positive", negative: "negative", throttled_by: "throttle") subject end end describe ".reset" do subject { described_class.reset("name") } it "delegates to setting" do expect(Sail::Setting).to receive(:reset).with("name") subject end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
sail-3.1.0 | spec/sail_spec.rb |
sail-3.0.1 | spec/sail_spec.rb |
sail-3.0.0 | spec/sail_spec.rb |