1
0
Fork 0
mirror of https://github.com/thoughtbot/capybara-webkit synced 2023-03-27 23:22:28 -04:00

Read the expected number of bytes from StringIO

* Instead of sleep, use blocking #read to determine if the expected
  message is logged.
* Fixes failure 2 from #615.
This commit is contained in:
Matthew Horan 2014-01-28 20:03:09 -05:00
parent 2b417defb8
commit 3f3ad93888

View file

@ -28,8 +28,7 @@ describe Capybara::Webkit::Connection do
redirected_connection.puts 1
redirected_connection.puts script.to_s.bytesize
redirected_connection.print script
sleep(0.5)
io.string.should =~ /hello world $/
io.read(11) =~ /hello world $/
end
it 'does not forward stderr to nil' do