Sha256: dd507f6077d9c2dfedc0d9d5158046e617c7a1063f7cf12a982f01fb9b09d47d

Contents?: true

Size: 668 Bytes

Versions: 10

Compression:

Stored size: 668 Bytes

Contents

# encoding: binary
require 'spec_helper'

RSpec.describe 'Masking frame draft 07' do
  it 'should encode and decode masked frame correctly' do
    outgoing_frame = WebSocket::Frame::Outgoing::Client.new(data: 'Hello World', type: 'text')
    outgoing_frame.to_s
    expect(outgoing_frame.error).to be_nil
    incoming_frame = WebSocket::Frame::Incoming::Server.new(data: outgoing_frame.to_s).next
    expect(incoming_frame).not_to be_nil
    expect(incoming_frame.class).to eql(WebSocket::Frame::Incoming::Server)
    expect(incoming_frame.error).to be_nil
    expect(incoming_frame.decoded?).to be true
    expect(incoming_frame.to_s).to eql('Hello World')
  end
end

Version data entries

10 entries across 9 versions & 2 rubygems

Version Path
tdiary-5.0.5 vendor/bundle/gems/websocket-1.2.4/spec/frame/masking_spec.rb
tdiary-5.0.5 vendor/bundle/gems/tdiary-5.0.4/vendor/bundle/gems/websocket-1.2.4/spec/frame/masking_spec.rb
tdiary-5.0.4 vendor/bundle/gems/websocket-1.2.4/spec/frame/masking_spec.rb
websocket-1.2.4 spec/frame/masking_spec.rb
tdiary-5.0.2 vendor/bundle/gems/websocket-1.2.3/spec/frame/masking_spec.rb
tdiary-5.0.1 vendor/bundle/gems/websocket-1.2.3/spec/frame/masking_spec.rb
websocket-1.2.3 spec/frame/masking_spec.rb
websocket-1.2.2 spec/frame/masking_spec.rb
websocket-1.2.1 spec/frame/masking_spec.rb
websocket-1.2.0 spec/frame/masking_spec.rb