Sha256: 66b5e0fa66ca0c64238284581d6c13156b059c06e40806597c5f5d4c4f99f292

Contents?: true

Size: 407 Bytes

Versions: 30

Compression:

Stored size: 407 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
    described_class.encode_body('1', 1, 65536).size.should == 1
  end

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

Version data entries

30 entries across 30 versions & 1 rubygems

Version Path
amq-protocol-1.9.2 spec/amq/protocol/blank_body_encoding_spec.rb
amq-protocol-1.9.1 spec/amq/protocol/blank_body_encoding_spec.rb
amq-protocol-1.9.0 spec/amq/protocol/blank_body_encoding_spec.rb
amq-protocol-1.8.0 spec/amq/protocol/blank_body_encoding_spec.rb
amq-protocol-1.7.0 spec/amq/protocol/blank_body_encoding_spec.rb
amq-protocol-1.6.0 spec/amq/protocol/blank_body_encoding_spec.rb
amq-protocol-1.5.0 spec/amq/protocol/blank_body_encoding_spec.rb
amq-protocol-1.4.0 spec/amq/protocol/blank_body_encoding_spec.rb
amq-protocol-1.3.0 spec/amq/protocol/blank_body_encoding_spec.rb
amq-protocol-1.2.0 spec/amq/protocol/blank_body_encoding_spec.rb
amq-protocol-1.1.0 spec/amq/protocol/blank_body_encoding_spec.rb
amq-protocol-1.0.1 spec/amq/protocol/blank_body_encoding_spec.rb
amq-protocol-1.0.0 spec/amq/protocol/blank_body_encoding_spec.rb
amq-protocol-0.9.5 spec/amq/protocol/blank_body_encoding_spec.rb
amq-protocol-1.0.0.pre7 spec/amq/protocol/blank_body_encoding_spec.rb
amq-protocol-0.9.4 spec/amq/protocol/blank_body_encoding_spec.rb
amq-protocol-1.0.0.pre6 spec/amq/protocol/blank_body_encoding_spec.rb
amq-protocol-0.9.3 spec/amq/protocol/blank_body_encoding_spec.rb
amq-protocol-1.0.0.pre5 spec/amq/protocol/blank_body_encoding_spec.rb
amq-protocol-0.9.2 spec/amq/protocol/blank_body_encoding_spec.rb