From b51126dd5e3691d56144f1b69163d9f727611008 Mon Sep 17 00:00:00 2001 From: Robin Ward <robin.ward@gmail.com> Date: Mon, 22 May 2017 17:52:13 -0400 Subject: [PATCH] FIX: Reset the WebMock after before every test --- spec/components/final_destination_spec.rb | 8 -------- spec/rails_helper.rb | 1 + 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/spec/components/final_destination_spec.rb b/spec/components/final_destination_spec.rb index 78c4473d3fc..1e723e6cfa1 100644 --- a/spec/components/final_destination_spec.rb +++ b/spec/components/final_destination_spec.rb @@ -18,14 +18,6 @@ describe FinalDestination do } end - before do - WebMock.reset! - end - - after do - WebMock.reset! - end - let(:doc_response) do { body: "<html>document</html>", headers: { "Content-Type" => "text/html" } } diff --git a/spec/rails_helper.rb b/spec/rails_helper.rb index 359727768d9..e6ed08fb571 100644 --- a/spec/rails_helper.rb +++ b/spec/rails_helper.rb @@ -124,6 +124,7 @@ Spork.prefork do Discourse.clear_readonly! I18n.locale = :en + WebMock.reset! end class TestCurrentUserProvider < Auth::DefaultCurrentUserProvider