diff options
author | Seb Bacon <seb.bacon@gmail.com> | 2012-01-18 11:07:50 +0000 |
---|---|---|
committer | Seb Bacon <seb.bacon@gmail.com> | 2012-01-18 11:07:50 +0000 |
commit | 46a8ec0fae82f8bc74077c4754b35aa0bd9a5ccd (patch) | |
tree | d1d9db41c32315c0ca77fa56dfca42253740507f /spec/controllers/application_controller_spec.rb | |
parent | 936c3b2fb1365e46239ff98ab962460d0c459730 (diff) |
Fix more test breakage
Diffstat (limited to 'spec/controllers/application_controller_spec.rb')
-rw-r--r-- | spec/controllers/application_controller_spec.rb | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/spec/controllers/application_controller_spec.rb b/spec/controllers/application_controller_spec.rb index 8c3730a7e..2e0e99200 100644 --- a/spec/controllers/application_controller_spec.rb +++ b/spec/controllers/application_controller_spec.rb @@ -2,6 +2,12 @@ require File.expand_path(File.dirname(__FILE__) + '/../spec_helper') require 'fakeweb' describe ApplicationController, "when accessing third party services" do + before (:each) do + FakeWeb.clean_registry + end + after (:each) do + FakeWeb.clean_registry + end it "should succeed if the service responds OK" do config = MySociety::Config.load_default() config['GAZE_URL'] = 'http://denmark.com' @@ -22,7 +28,7 @@ describe ApplicationController, "when accessing third party services" do country.should == config['ISO_COUNTRY_CODE'] end it "should fail silently if the country_from_ip service returns an error" do - FakeWeb.register_uri(:get, %r|http://500.com|, :body => "Error", :status => ["500", "Error"]) + FakeWeb.register_uri(:get, %r|500.com|, :body => "Error", :status => ["500", "Error"]) config = MySociety::Config.load_default() config['GAZE_URL'] = 'http://500.com' country = self.controller.send :country_from_ip |