There was an error while loading. Please reload this page.
1 parent cf09d58 commit 9422b41Copy full SHA for 9422b41
1 file changed
rb/spec/rspec_matchers.rb
@@ -21,13 +21,13 @@
21
match do |actual|
22
# Suppresses logging output to stdout while ensuring that it is still happening
23
default_output = Selenium::WebDriver.logger.io
24
- tempfile = Tempfile.new
25
- Selenium::WebDriver.logger.output = tempfile
+ io = StringIO.new
+ Selenium::WebDriver.logger.output = io
26
27
actual.call
28
29
Selenium::WebDriver.logger.output = default_output
30
- @deprecations_found = (tempfile.rewind && tempfile.read).scan(/DEPRECATION\] \[:([^\]]*)\]/).flatten.map(&:to_sym)
+ @deprecations_found = (io.rewind && io.read).scan(/DEPRECATION\] \[:([^\]]*)\]/).flatten.map(&:to_sym)
31
expect(Array(deprecation).sort).to eq(@deprecations_found.sort)
32
end
33
0 commit comments