spec/spec_helper.rb in reel-0.3.0 vs spec/spec_helper.rb in reel-0.4.0.pre

- old
+ new

@@ -1,7 +1,9 @@ require 'bundler/setup' require 'reel' +require 'coveralls' +Coveralls.wear! logfile = File.open(File.expand_path("../../log/test.log", __FILE__), 'a') Celluloid.logger = Logger.new(logfile) def example_addr; '127.0.0.1'; end @@ -11,11 +13,11 @@ def with_reel(handler) server = Reel::Server.new(example_addr, example_port, &handler) yield server ensure - server.terminate + server.terminate if server && server.alive? end def with_socket_pair host = '127.0.0.1' port = 10101 @@ -86,6 +88,6 @@ end let(:handshake) { WebSocket::ClientHandshake.new(:get, example_url, handshake_headers) } end end -end \ No newline at end of file +end