From 1f8bc6560b5240a7aa84ac8d6bdc47eea5d2d781 Mon Sep 17 00:00:00 2001 From: Henare Degan Date: Mon, 10 Dec 2012 00:09:55 +1100 Subject: The with_locale has been removed in Globalize3 I think Globalize is supposed to pick up the locale from I18n anyway so I don't know if these are needed. I think I still haven't done the right thing but it's time to move on. --- spec/controllers/public_body_controller_spec.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'spec/controllers/public_body_controller_spec.rb') diff --git a/spec/controllers/public_body_controller_spec.rb b/spec/controllers/public_body_controller_spec.rb index e97db5a12..9c7f7dc7f 100644 --- a/spec/controllers/public_body_controller_spec.rb +++ b/spec/controllers/public_body_controller_spec.rb @@ -44,14 +44,14 @@ describe PublicBodyController, "when showing a body" do end it "should assign the body using different locale from that used for url_name" do - PublicBody.with_locales(:es) do + I18n.with_locale(:es) do get :show, {:url_name => "dfh", :view => 'all'} assigns[:public_body].notes.should == "Baguette" end end it "should assign the body using same locale as that used in url_name" do - PublicBody.with_locales(:es) do + I18n.with_locale(:es) do get :show, {:url_name => "edfh", :view => 'all'} assigns[:public_body].notes.should == "Baguette" end @@ -87,7 +87,7 @@ describe PublicBodyController, "when listing bodies" do end it "should list all bodies from default locale, even when there are no translations for selected locale" do - PublicBody.with_locales(:en) do + I18n.with_locale(:en) do @english_only = PublicBody.new(:name => 'English only', :short_name => 'EO', :request_email => 'english@flourish.org', @@ -95,7 +95,7 @@ describe PublicBodyController, "when listing bodies" do :last_edit_comment => '') @english_only.save end - PublicBody.with_locales(:es) do + I18n.with_locale(:es) do get :list assigns[:public_bodies].include?(@english_only).should == true end -- cgit v1.2.3