diff options
author | Robin Houston <robin.houston@gmail.com> | 2012-01-20 12:12:16 +0000 |
---|---|---|
committer | Robin Houston <robin.houston@gmail.com> | 2012-01-20 12:12:16 +0000 |
commit | c92892e3a4fdc3e339996fc4db737634b15894c8 (patch) | |
tree | 72de843f8a6758cc480a88f23072ab706b41670f /spec/controllers/general_controller_spec.rb | |
parent | 34dad8557132bc730db8e502684f12e4c247c24d (diff) |
Make sure the FakeWeb registry is kept clean
To be fair this change does not seem to make any tests pass that
didn’t pass before, but (based on my limited understanding) it
seems like a good idea. It also conforms to how FakeWeb is used
in application_controller_spec.rb.
Diffstat (limited to 'spec/controllers/general_controller_spec.rb')
-rw-r--r-- | spec/controllers/general_controller_spec.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/spec/controllers/general_controller_spec.rb b/spec/controllers/general_controller_spec.rb index 7dd0a70d3..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 |