lib/isolator/adapters/http.rb in isolator-0.1.0.pre2 vs lib/isolator/adapters/http.rb in isolator-0.1.0
- old
+ new
@@ -1,20 +1,5 @@
# frozen_string_literal: true
-require "sniffer"
+require "isolator/adapters/http/sniffer"
-Sniffer.config do |c|
- # Disable Sniffer logger
- c.logger = Logger.new(IO::NULL)
-end
-
-Isolator.isolate :http, Sniffer.singleton_class,
- :store, exception_class: Isolator::HTTPError
-
-Isolator.before_isolate do
- Sniffer.enable!
-end
-
-Isolator.after_isolate do
- Sniffer.clear!
- Sniffer.disable!
-end
+require "isolator/adapters/http/webmock" if defined?(::WebMock)