Module: Webrat::Selenium::SilenceStream

Included in:
ApplicationServers::Base, SeleniumRCServer, Webrat::SeleniumSession
Defined in:
lib/webrat/selenium/silence_stream.rb

Instance Method Summary collapse

Instance Method Details

#silence_stream(stream) ⇒ Object



7
8
9
10
11
12
13
14
# File 'lib/webrat/selenium/silence_stream.rb', line 7

def silence_stream(stream)
  old_stream = stream.dup
  stream.reopen(RUBY_PLATFORM =~ /mswin/ ? 'NUL:' : '/dev/null')
  stream.sync = true
  yield
ensure
  stream.reopen(old_stream)
end