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.0.0.pre4 spec/amq/protocol/confirm_spec.rb
amq-protocol-1.0.0.pre3 spec/amq/protocol/confirm_spec.rb
amq-protocol-1.0.0.pre2 spec/amq/protocol/confirm_spec.rb
amq-protocol-0.9.1 spec/amq/protocol/confirm_spec.rb
amq-protocol-1.0.0.pre1 spec/amq/protocol/confirm_spec.rb
amq-protocol-0.9.0 spec/amq/protocol/confirm_spec.rb
amq-protocol-0.8.4 spec/amq/protocol/confirm_spec.rb
amq-protocol-0.8.3 spec/amq/protocol/confirm_spec.rb
amq-protocol-0.8.1 spec/amq/protocol/confirm_spec.rb
amq-protocol-0.8.0 spec/amq/protocol/confirm_spec.rb
amq-protocol-0.7.0 spec/amq/protocol/confirm_spec.rb
amq-protocol-0.7.0.beta2 spec/amq/protocol/confirm_spec.rb
amq-protocol-0.7.0.beta1 spec/amq/protocol/confirm_spec.rb
amq-protocol-0.7.0.alpha7 spec/amq/protocol/confirm_spec.rb
amq-protocol-0.7.0.alpha6 spec/amq/protocol/confirm_spec.rb
amq-protocol-0.7.0.alpha5 spec/amq/protocol/confirm_spec.rb
amq-protocol-0.7.0.alpha4 spec/amq/protocol/confirm_spec.rb
amq-protocol-0.7.0.alpha2 spec/amq/protocol/confirm_spec.rb
amq-protocol-0.7.0.alpha1 spec/amq/protocol/confirm_spec.rb
amq-protocol-0.6.0.pre spec/amq/protocol/confirm_spec.rb