Skip to content

Commit 293e20b

Browse files
committed
Re-require typhoeus after removing constant in tests
1 parent 5da9105 commit 293e20b

File tree

3 files changed

+15
-0
lines changed

3 files changed

+15
-0
lines changed

spec/app-search/client_spec.rb

+5
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,11 @@
9494
it 'uses Faraday NetHttp' do
9595
Object.send(:remove_const, :Typhoeus) if defined?(Typhoeus)
9696
expect(adapter).to eq Faraday::Adapter::NetHttp
97+
if Gem::Version.new(Faraday::VERSION) >= Gem::Version.new(2)
98+
require 'faraday/typhoeus'
99+
else
100+
require 'faraday'
101+
end
97102
end
98103
end
99104

spec/enterprise-search/client_spec.rb

+5
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,11 @@ def messages; @strio.string; end
112112
it 'uses Faraday NetHttp' do
113113
Object.send(:remove_const, :Typhoeus) if defined?(Typhoeus)
114114
expect(adapter).to eq Faraday::Adapter::NetHttp
115+
if Gem::Version.new(Faraday::VERSION) >= Gem::Version.new(2)
116+
require 'faraday/typhoeus'
117+
else
118+
require 'faraday'
119+
end
115120
end
116121
end
117122

spec/workplace-search/client_spec.rb

+5
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,11 @@
105105
it 'uses Faraday NetHttp' do
106106
Object.send(:remove_const, :Typhoeus) if defined?(Typhoeus)
107107
expect(adapter).to eq Faraday::Adapter::NetHttp
108+
if Gem::Version.new(Faraday::VERSION) >= Gem::Version.new(2)
109+
require 'faraday/typhoeus'
110+
else
111+
require 'faraday'
112+
end
108113
end
109114
end
110115

0 commit comments

Comments
 (0)