diff --git a/.rspec b/.rspec index 5cc5ff03168..7b862b57b96 100644 --- a/.rspec +++ b/.rspec @@ -1,4 +1,4 @@ ---format documentation +--format Fuubar --profile --color --tag ~performance diff --git a/app/models/app_config.rb b/app/models/app_config.rb index a2b8e10919a..927ec2abee6 100644 --- a/app/models/app_config.rb +++ b/app/models/app_config.rb @@ -77,6 +77,7 @@ def self.setup! normalize_admins normalize_pod_services deprecate_hoptoad_api_key + self[:to_ary] = [] end def self.configured_services diff --git a/spec/models/app_config_spec.rb b/spec/models/app_config_spec.rb index 792fd84cb9a..bc37389f9b3 100644 --- a/spec/models/app_config_spec.rb +++ b/spec/models/app_config_spec.rb @@ -184,10 +184,6 @@ 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 @@ -195,13 +191,10 @@ 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 @@ -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 @@ -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