diff options
author | Robin Houston <robin.houston@gmail.com> | 2012-01-20 13:31:46 +0000 |
---|---|---|
committer | Robin Houston <robin.houston@gmail.com> | 2012-01-20 13:31:46 +0000 |
commit | 8932a6d67c4386a378783b8a6a1ded4d93c41891 (patch) | |
tree | 778785348cb01160de20fc21e6205676144ed553 /spec/controllers/general_controller_spec.rb | |
parent | 742ea045560f91e472901bea3d932669f1c50d61 (diff) | |
parent | 35a2c007a65ff20785e02b738077fe52efcb90bf (diff) |
Merge branch 'wdtk' of github.com:sebbacon/alaveteli into wdtk
Diffstat (limited to 'spec/controllers/general_controller_spec.rb')
-rw-r--r-- | spec/controllers/general_controller_spec.rb | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/spec/controllers/general_controller_spec.rb b/spec/controllers/general_controller_spec.rb index e1539fa68..a5bb3ba5a 100644 --- a/spec/controllers/general_controller_spec.rb +++ b/spec/controllers/general_controller_spec.rb @@ -2,6 +2,13 @@ require File.expand_path(File.dirname(__FILE__) + '/../spec_helper') require 'fakeweb' describe GeneralController, "when trying to show the blog" do + before (:each) do + FakeWeb.clean_registry + end + after (:each) do + FakeWeb.clean_registry + end + it "should fail silently if the blog is returning an error" do FakeWeb.register_uri(:get, %r|.*|, :body => "Error", :status => ["500", "Error"]) get :blog @@ -84,13 +91,11 @@ describe GeneralController, "when searching" do describe "when using different locale settings" do home_link_regex = /href=".*\/en"/ it "should generate URLs with a locale prepended when there's more than one locale set" do - ActionController::Routing::Routes.add_filters('conditionallyprependlocale') get :frontpage response.should have_text(home_link_regex) end it "should generate URLs without a locale prepended when there's only one locale set" do - ActionController::Routing::Routes.add_filters('conditionallyprependlocale') old_available_locales = FastGettext.default_available_locales available_locales = ['en'] FastGettext.default_available_locales = available_locales |