Sha256: 8fd895663932241f75301ed8bcf5466579603d588951a1bd74cf6ac24145fd69

Contents?: true

Size: 578 Bytes

Versions: 16

Compression:

Stored size: 578 Bytes

Contents

require 'spec_helper'
require 'support/mock_web_socket'

module WebsocketRails
  module ConnectionAdapters
    describe WebSocket do
      
      before do
        @socket = MockWebSocket.new
        Faye::WebSocket.stub(:new).and_return(@socket)
        @adapter = WebSocket.new( mock_request, double('Dispatcher').as_null_object )
      end
      
      context "#send" do
        it "should send the message to the websocket connection" do
          @socket.should_receive(:send).with(:message)
          @adapter.send :message
        end
      end
      
    end
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
websocket-rails-0.4.7 spec/unit/connection_adapters/web_socket_spec.rb
websocket-rails-0.4.6 spec/unit/connection_adapters/web_socket_spec.rb
websocket-rails-0.4.5 spec/unit/connection_adapters/web_socket_spec.rb
websocket-rails-0.4.4 spec/unit/connection_adapters/web_socket_spec.rb
websocket-rails-0.4.3 spec/unit/connection_adapters/web_socket_spec.rb
websocket-rails-0.4.2 spec/unit/connection_adapters/web_socket_spec.rb
websocket-rails-0.4.1 spec/unit/connection_adapters/web_socket_spec.rb
websocket-rails-0.4.0 spec/unit/connection_adapters/web_socket_spec.rb
websocket-rails-0.3.0 spec/unit/connection_adapters/web_socket_spec.rb
websocket-rails-0.2.1 spec/unit/connection_adapters/web_socket_spec.rb
websocket-rails-0.2.0 spec/unit/connection_adapters/web_socket_spec.rb
websocket-rails-0.1.9 spec/unit/connection_adapters/web_socket_spec.rb
websocket-rails-0.1.8 spec/unit/connection_adapters/web_socket_spec.rb
websocket-rails-0.1.7 spec/unit/connection_adapters/web_socket_spec.rb
websocket-rails-0.1.6 spec/unit/connection_adapters/web_socket_spec.rb
websocket-rails-0.1.5 spec/unit/connection_adapters/web_socket_spec.rb