Sha256: 812d456de239d90b62768cec009feca7b82666117dd7c1d054ef958b64941c35
Contents?: true
Size: 1.14 KB
Versions: 7
Compression:
Stored size: 1.14 KB
Contents
require "spec_helper" describe Brightbox::BBConfig do describe "#clear_default_client" do context "when default client is set" do let(:contents) do <<-EOS [core] default_client = fnord [fnord] key = value EOS end before do @config = config_from_contents(contents) end it "does alters the value" do expect { @config.clear_default_client }.to change(@config, :default_client) expect(@config.default_client).to be_nil end it "dirties the config" do expect { @config.clear_default_client }.to change(@config, :dirty?) end end context "when default client is not set" do before do remove_config @config = Brightbox::BBConfig.new end it "does not alter the value" do expect { @config.clear_default_client }.to_not change(@config, :default_client) end it "does not dirty the config" do expect { @config.clear_default_client }.to_not change(@config, :dirty?) end end end end
Version data entries
7 entries across 7 versions & 1 rubygems