Sha256: 133381867e8a6147696789c33ddc32e83b555ff9078e0cd8c6b71d94d84d0b67
Contents?: true
Size: 810 Bytes
Versions: 1
Compression:
Stored size: 810 Bytes
Contents
require "spec_helper" module RockConfig describe Manager do let(:configuration) do configuration = Configuration.new configuration.scanned_directories << File.join(Dir.pwd, "spec", "fixtures") configuration.config_loaders << YamlLoader.new configuration end it "returns config if found" do manager = Manager.new(configuration) manager_result = manager.fetch "database", "test" manager_result.should_not be_nil end it "raises error if the config doesnt have the environment" do manager = Manager.new(configuration) manager_result = manager.fetch "database", "development" expect do manager_result = manager.fetch "database", "me no exist yo" end.to raise_error(EnvironmentNotFoundError) end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
rock_config-0.0.4 | spec/manager_spec.rb |