Skip to content
This repository has been archived by the owner on Jun 30, 2022. It is now read-only.

Commit

Permalink
Forego testing RTMConnection#receive_message through the public inter…
Browse files Browse the repository at this point in the history
…face.
  • Loading branch information
jimmycuadra committed Mar 3, 2015
1 parent 14b3023 commit b5e4865
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions spec/lita/adapters/slack/rtm_connection_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,10 @@ def with_websocket(subject, queue)

expect(message_handler).to receive(:handle)

with_websocket(subject, queue) do |websocket|
websocket.emit('message', event)
end
# Testing private methods directly is bad, but it's difficult to get
# the timing right when testing it by emitting the "message" event on
# the WebSocket.
subject.send(:receive_message, event)
end
end

Expand Down

0 comments on commit b5e4865

Please sign in to comment.