From c9feb6a4002fc4b63021aeb5ffd6b2846ada7748 Mon Sep 17 00:00:00 2001 From: Henare Degan Date: Tue, 11 Dec 2012 15:00:40 +1100 Subject: integrate_views is render_views RSpec 2 --- spec/controllers/services_controller_spec.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'spec/controllers/services_controller_spec.rb') diff --git a/spec/controllers/services_controller_spec.rb b/spec/controllers/services_controller_spec.rb index a701ae247..d2d22826a 100644 --- a/spec/controllers/services_controller_spec.rb +++ b/spec/controllers/services_controller_spec.rb @@ -3,7 +3,7 @@ require File.expand_path(File.dirname(__FILE__) + '/../spec_helper') describe ServicesController, "when using web services" do - integrate_views + render_views # store and restore the locale in the context of the test suite to isolate # changes made in these tests @@ -40,4 +40,4 @@ describe ServicesController, "when using web services" do FastGettext.set_locale(@old_locale) end -end \ No newline at end of file +end -- cgit v1.2.3 From cbdff06aa95a7987b54c712dc6729e138f608eca Mon Sep 17 00:00:00 2001 From: Henare Degan Date: Sun, 3 Mar 2013 14:52:30 +1100 Subject: Rename Configuration class to avoid conflict with ActiveSupport::Configurable --- spec/controllers/services_controller_spec.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'spec/controllers/services_controller_spec.rb') diff --git a/spec/controllers/services_controller_spec.rb b/spec/controllers/services_controller_spec.rb index 796c6b63d..399f48acb 100644 --- a/spec/controllers/services_controller_spec.rb +++ b/spec/controllers/services_controller_spec.rb @@ -54,27 +54,27 @@ describe ServicesController, "when returning a message for people in other count it "should return the 'another country' message if the service responds OK" do config = MySociety::Config.load_default() config['ISO_COUNTRY_CODE'] = "DE" - Configuration.stub!(:gaze_url).and_return('http://denmark.com') + AlaveteliConfiguration.stub!(:gaze_url).and_return('http://denmark.com') FakeWeb.register_uri(:get, %r|denmark.com|, :body => "DK") get :other_country_message response.should be_success response.body.should == 'Hello! We have an important message for visitors outside Deutschland X' end it "should default to no message if the country_from_ip domain doesn't exist" do - Configuration.stub!(:gaze_url).and_return('http://12123sdf14qsd.com') + AlaveteliConfiguration.stub!(:gaze_url).and_return('http://12123sdf14qsd.com') get :other_country_message response.should be_success response.body.should == '' end it "should default to no message if the country_from_ip service doesn't exist" do - Configuration.stub!(:gaze_url).and_return('http://www.google.com') + AlaveteliConfiguration.stub!(:gaze_url).and_return('http://www.google.com') get :other_country_message response.should be_success response.body.should == '' end it "should default to no message if the country_from_ip service returns an error" do FakeWeb.register_uri(:get, %r|500.com|, :body => "Error", :status => ["500", "Error"]) - Configuration.stub!(:gaze_url).and_return('http://500.com') + AlaveteliConfiguration.stub!(:gaze_url).and_return('http://500.com') get :other_country_message response.should be_success response.body.should == '' -- cgit v1.2.3