Sha256: 6202aa8976fc35bd8756ac09e831eebd0d1fbe892e0278a9f54cd037953a3ba0
Contents?: true
Size: 1.1 KB
Versions: 19
Compression:
Stored size: 1.1 KB
Contents
require "spec_helper" describe Brightbox::BBConfig do describe "#config_directory" do context "when default location is used" do it "returns a String of the users `.brightbox` directory" do config = Brightbox::BBConfig.new expanded_path = File.expand_path("~/.brightbox") expect(config.config_directory).to eql(expanded_path) end end context "when absolute custom location is set" do it "returns a String of the expanded directory" do config_options = { :directory => "/etc/local/brightbox_cli" } config = Brightbox::BBConfig.new(config_options) expect(config.config_directory).to eql("/etc/local/brightbox_cli") end end context "when custom config location is set" do it "returns a String of the expanded directory" do config_options = { :directory => "~/.cli_config" } config = Brightbox::BBConfig.new(config_options) expanded_path = File.expand_path("~/.cli_config") expect(config.config_directory).to eql(expanded_path) end end end end
Version data entries
19 entries across 19 versions & 1 rubygems