beanstalkd/beaneater — pull request #31 by tdg5 (2013-09-16 10:09:10+00:00)
Title: Wait for fake beanstalk tcp server before running test

This pull request fixes a test error I'm seeing due to a race condition where the tests in prompt_regexp_test.rb begin before the fake beanstalkd TCP server is running. Here is the output from rake when the test fails:

```
1) Error:
Reading from socket client#test_0001_should reserve job with full body:
Beaneater::NotConnected: Could not connect to 'localhost:11301'
/src/beaneater/lib/beaneater/connection.rb:96:in `rescue in establish_connection'
/src/beaneater/lib/beaneater/connection.rb:92:in `establish_connection'
/src/beaneater/lib/beaneater/connection.rb:36:in `initialize'
/src/beaneater/lib/beaneater/pool.rb:25:in `new'
/src/beaneater/lib/beaneater/pool.rb:25:in `block in initialize'
/src/beaneater/lib/beaneater/pool.rb:25:in `map'
/src/beaneater/lib/beaneater/pool.rb:25:in `initialize'
/src/beaneater/test/prompt_regexp_test.rb:37:in `new'
/src/beaneater/test/prompt_regexp_test.rb:37:in `block (2 levels) in '
```