Sha256: b5f25c142df0315627333d72545faf5a1e83aaab675fa9f23129681307e08705

Contents?: true

Size: 972 Bytes

Versions: 2

Compression:

Stored size: 972 Bytes

Contents

shared_examples_for 'all handlers' do
  it "should return flash policy file" do
    conn = new_server_connection
    conn.write(flash_policy_request)
    conn.read(flash_policy_response.length).should eql(flash_policy_response)
  end
  
  context 'for draft75' do
    let(:handshake_request)  { spec75_handshake_request }
    let(:handshake_response) { spec75_handshake_response }
    let(:message)            { spec75_message }
    
    it_should_behave_like 'all drafts'
  end
  
  context 'for draft76' do
    let(:handshake_request)  { spec76_handshake_request }
    let(:handshake_response) { spec76_handshake_response }
    let(:message)            { spec76_message }
    
    it_should_behave_like 'all drafts'
  end
  
  context 'for draft03' do
    let(:handshake_request)  { spec03_handshake_request }
    let(:handshake_response) { spec03_handshake_response }
    let(:message)            { spec03_message }
    
    it_should_behave_like 'all drafts'
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
websocket-rack-0.3.0 spec/support/all_handlers.rb
websocket-rack-0.2.1 spec/support/all_handlers.rb