Sha256: 848b3b5b139568e61e8f65af2372f89e57aeeb404be774418c0a9db015a138c3

Contents?: true

Size: 1.05 KB

Versions: 41

Compression:

Stored size: 1.05 KB

Contents

# encoding: binary

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


module AMQ
  module Protocol
    class Confirm
      describe Select do
        describe '.decode' do
          subject do
            Select.decode("\x01")
          end
          
          its(:nowait) { should be_true }
        end
        
        describe '.encode' do
          it 'encodes the parameters into a MethodFrame' do
            channel = 1
            nowait = true
            method_frame = Select.encode(channel, nowait)
            method_frame.payload.should == "\x00U\x00\n\x01"
            method_frame.channel.should == 1
          end
        end
      end
      
      describe SelectOk do
        # describe '.decode' do
        # end
        
        describe '.encode' do
          it 'encodes the parameters into a MethodFrame' do
            channel = 1
            method_frame = SelectOk.encode(channel)
            method_frame.payload.should == "\000U\000\v"
            method_frame.channel.should == 1
          end
        end
      end
    end
  end
end

Version data entries

41 entries across 41 versions & 1 rubygems

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