Skip to content

Commit

Permalink
Moved helper which is only used in one spec
Browse files Browse the repository at this point in the history
  • Loading branch information
mloughran committed Dec 23, 2011
1 parent 38eeaf4 commit 684a576
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
5 changes: 0 additions & 5 deletions spec/helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -132,11 +132,6 @@ def format_response(r)
data
end

def handler(request, secure = false)
connection = Object.new
EM::WebSocket::HandlerFactory.build(connection, format_request(request), secure)
end

RSpec::Matchers.define :send_handshake do |response|
match do |actual|
actual.handshake.lines.sort == format_response(response).lines.sort
Expand Down
5 changes: 5 additions & 0 deletions spec/unit/handler_spec.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
require 'helper'

describe "EventMachine::WebSocket::Handler" do
def handler(request, secure = false)
connection = Object.new
EM::WebSocket::HandlerFactory.build(connection, format_request(request), secure)
end

before :each do
@request = {
:port => 80,
Expand Down

0 comments on commit 684a576

Please sign in to comment.