Sha256: dd63dd23560c0227b18af452c7ea2086b87688ba356bf10e5dc2f4dfbab5cef9
Contents?: true
Size: 1.5 KB
Versions: 3
Compression:
Stored size: 1.5 KB
Contents
require 'spec_helper' describe USPSFlags::Config do describe "flags_dir" do it "should return the current flags directory" do default_flags_dir = File.dirname(__dir__).gsub("/spec", "/lib") + "/output" expect(USPSFlags::Config.flags_dir).to eql(default_flags_dir) end end describe "log_path" do it "should return the current flags directory" do default_log_path = File.dirname(__dir__).gsub("/spec", "/lib") + "/output/log" expect(USPSFlags::Config.log_path).to eql(default_log_path) end end describe "trident" do it "should return a Hash from trident" do expect(USPSFlags::Config.trident).to be_a(Hash) end end describe "use_larger_tridents" do it "should return a Boolean from use_larger_tridents" do expect([true, false]).to include(USPSFlags::Config.use_larger_tridents) end end describe "log_fail_quietly" do it "should return a Boolean from log_fail_quietly" do expect([true, false]).to include(USPSFlags::Config.log_fail_quietly) end end describe "configuration constructor" do it "should return a properly constructed configuration" do test_flags_dir = "./path/to/flags/for/spec" @config = USPSFlags::Config.new do |config| config.flags_dir = test_flags_dir end expect(@config.flags_dir).to eql(test_flags_dir) expect(@config.reset).to eql(false) expect(@config.use_larger_tridents).to eql(true) expect(@config.log_fail_quietly).to eql(true) end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
usps_flags-0.2.6 | spec/usps_flags/config_spec.rb |
usps_flags-0.2.5 | spec/usps_flags/config_spec.rb |
usps_flags-0.2.4 | spec/usps_flags/config_spec.rb |