diaspora/spec/lib/configuration/provider/dynamic_spec.rb
Jonne Haß 2a4db54db9 New configuration system
* Throw away old system
* Add new system
* Add new example files
* Replace all calls
* add the most important docs
* Add Specs
* rename disable_ssl_requirement to require_ssl
* cloudfiles isn't used/called in our code
* since community_spotlight.list is only used as enable flag replace it with such one and remove all legacy and irelevant codepaths around it
* die if session secret is unset and on heroku
* First basic infrastructure for version information
2012-09-26 20:19:37 +02:00

23 lines
709 B
Ruby

require 'spec_helper'
describe Configuration::Provider::Dynamic do
subject { described_class.new }
describe "#lookup_path" do
it "returns nil if the setting was never set" do
subject.lookup_path(["not_me"]).should be_nil
end
it "remembers the setting if it ends with =" do
subject.lookup_path(["find_me", "later="], "there")
subject.lookup_path(["find_me", "later"]).should == "there"
end
it "calls .get on the argument if a proxy object is given" do
proxy = mock
proxy.stub(:respond_to?).and_return(true)
proxy.stub(:_proxy?).and_return(true)
proxy.should_receive(:get)
subject.lookup_path(["bla="], proxy)
end
end
end