Permalink
Browse files

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.
  • Loading branch information...
1 parent 2b417de commit 3f3ad93888d409a374d84f47295e2a8c0d68481b @mhoran mhoran committed Jan 29, 2014
Showing with 1 addition and 2 deletions.
  1. +1 −2 spec/connection_spec.rb
View
@@ -28,8 +28,7 @@
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

0 comments on commit 3f3ad93

Please sign in to comment.