spec/config_spec.rb in anyway_config-1.4.3 vs spec/config_spec.rb in anyway_config-1.4.4
- old
+ new
@@ -67,9 +67,16 @@
it "load config from file if no secrets" do
expect(conf.user[:name]).to eq "root"
expect(conf.user[:password]).to eq "root"
end
end
+
+ context "with overiden path" do
+ it "reads custom config path" do
+ ENV['COOL_CONF'] = Rails.root.join("config", "cool_custom.yml").to_s
+ expect(conf.host).to eq "custom.host"
+ end
+ end
end
describe "load from env" do
context "when env_prefix is not specified" do
it "uses config_name as a prefix to load variables" do