Sha256: 1eb6a98b3cea8098274638e78aefcbb852e4bc1e247f03e4faa92bcefdcc501f

Contents?: true

Size: 417 Bytes

Versions: 4

Compression:

Stored size: 417 Bytes

Contents

# encoding: binary

require File.expand_path('../../../spec_helper', __FILE__)


describe AMQ::Protocol::Method, ".encode_body" do
  it "encodes 1-byte long payload as exactly 1 body frame" do
    expect(described_class.encode_body('1', 1, 65536).size).to eq(1)
  end

  it "encodes 0-byte long (blank) payload as exactly 0 body frame" do
    expect(described_class.encode_body('', 1, 65536).size).to eq(0)
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
amq-protocol-2.2.0 spec/amq/protocol/blank_body_encoding_spec.rb
amq-protocol-2.1.0 spec/amq/protocol/blank_body_encoding_spec.rb
amq-protocol-2.0.1 spec/amq/protocol/blank_body_encoding_spec.rb
amq-protocol-2.0.0 spec/amq/protocol/blank_body_encoding_spec.rb