Skip to content

Commit

Permalink
just stop settingslogic from breaking rspec output for now
Browse files Browse the repository at this point in the history
  • Loading branch information
jhass committed Sep 26, 2012
1 parent 06d9ff2 commit 7a47870
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .rspec
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
--format documentation
--format Fuubar
--profile
--color
--tag ~performance
Expand Down
1 change: 1 addition & 0 deletions app/models/app_config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ def self.setup!
normalize_admins
normalize_pod_services
deprecate_hoptoad_api_key
self[:to_ary] = []
end

def self.configured_services
Expand Down
18 changes: 9 additions & 9 deletions spec/models/app_config_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -184,24 +184,17 @@
ENV["REDISTOGO_URL"] = "redis://myserver"
end

after do
ENV["REDISTOGO_URL"] = nil
end

it "uses that" do
AppConfig.get_redis_instance.client.host.should == "myserver"
end
end

context "with REDIS_URL set" do
before do
ENV["REDISTOGO_URL"] = nil
ENV["REDIS_URL"] = "redis://yourserver"
end

after do
ENV["REDIS_URL"] = nil
end

it "uses that" do
AppConfig.get_redis_instance.client.host.should == "yourserver"
end
Expand All @@ -210,10 +203,11 @@
context "with redis_url set" do
before do
AppConfig[:redis_url] = "redis://ourserver"
ENV["REDISTOGO_URL"] = nil
ENV["REDIS_URL"] = nil
end

after do
AppConfig[:redis_url] = ""
end

it "uses that" do
Expand All @@ -222,6 +216,12 @@
end

context "with nothing set" do
before do
AppConfig[:redis_url] = ""
ENV["REDISTOGO_URL"] = nil
ENV["REDIS_URL"] = nil
end

it "uses localhost" do
AppConfig.get_redis_instance.client.host.should == "127.0.0.1"
end
Expand Down

0 comments on commit 7a47870

Please sign in to comment.