Skip to content
This repository has been archived by the owner on Dec 7, 2018. It is now read-only.

Commit

Permalink
Fix more guards in specs
Browse files Browse the repository at this point in the history
  • Loading branch information
halorgium committed Apr 12, 2013
1 parent 86044e1 commit 1c87d6c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion spec/reel/app_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
end

after(:each) do
@app.server.terminate if @app.server.alive?
@app.server.terminate if @app && @app.server.alive?
end

it 'responds to get requests' do
Expand Down
2 changes: 1 addition & 1 deletion spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def with_reel(handler)
server = Reel::Server.new(example_addr, example_port, &handler)
yield server
ensure
server.terminate if server
server.terminate if server && server.alive?
end

def with_socket_pair
Expand Down

0 comments on commit 1c87d6c

Please sign in to comment.