Skip to content

Commit f7a27f4

Browse files
authored
Merge pull request #412 from seanpdoyle/http-mock-reset
Reset `ActiveResource::HttpMock` in test teardown
2 parents cdef810 + 388454c commit f7a27f4

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

lib/active_resource/railtie.rb

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,5 +27,11 @@ class Railtie < Rails::Railtie
2727
app.deprecators[:active_resource] = ActiveResource.deprecator
2828
end
2929
end
30+
31+
initializer "active_resource.http_mock" do
32+
ActiveSupport.on_load(:active_support_test_case) do
33+
teardown { ActiveResource::HttpMock.reset! }
34+
end
35+
end
3036
end
3137
end

0 commit comments

Comments
 (0)