Sha256: 31e58a31f29a7ccb046ea754873abe0cf7fb1e669842cef8e30fc93c2ddf902e
Contents?: true
Size: 345 Bytes
Versions: 3
Compression:
Stored size: 345 Bytes
Contents
module Test module SpawnServerHelper def start_server(host, &block) begin server = Sanford::Server.new(host, { :ready_timeout => 0.1 }) server.listen(host.ip, host.port) thread = server.run yield ensure server.halt if server thread.join if thread end end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
sanford-0.6.3 | test/support/helpers.rb |
sanford-0.6.2 | test/support/helpers.rb |
sanford-0.6.1 | test/support/helpers.rb |