Permalink
Browse files

comments

  • Loading branch information...
thoughtless committed May 28, 2011
1 parent a596ede commit 6dbb216d6d51af68354395304258c5db17d8ac51
Showing with 12 additions and 0 deletions.
  1. +12 −0 lib/rspec/process_mocks/message_expectation.rb
@@ -8,6 +8,18 @@ def initialize(*args)
@tempfile = Tempfile.new("should-receive-#{@expected_from.object_id}-#{@sym}")
end
def verify_messages_received
# Maybe we should add a sleep loop here if @tempfile is empty. This may
# prevent a user of this library from having to add a sleep in the spec.
# Maybe this:
# @tempfile.rewind
# lines = @tempfile.readlines
# timeout = Configure.verify_timeout
# while lines.empty? && timeout > 0
# sleep 0.1
# timeout -= 0.1
# @tempfile.rewind
# lines = @tempfile.readlines
# end
@tempfile.rewind
lines = @tempfile.readlines

0 comments on commit 6dbb216

Please sign in to comment.