spec/amq/protocol/queue_spec.rb in amq-protocol-2.2.0 vs spec/amq/protocol/queue_spec.rb in amq-protocol-2.3.0.rc1

- old
+ new

@@ -1,14 +1,11 @@ # encoding: binary -require File.expand_path('../../../spec_helper', __FILE__) - - module AMQ module Protocol class Queue - describe Declare do + RSpec.describe Declare do describe '.encode' do it 'encodes the parameters into a MethodFrame' do channel = 1 queue = 'hello.world' passive = false @@ -22,23 +19,23 @@ expect(method_frame.channel).to eq(1) end end end - describe DeclareOk do + RSpec.describe DeclareOk do describe '.decode' do subject do DeclareOk.decode(" amq.gen-KduGSqQrpeUo1otnU0TWSA==\x00\x00\x00\x00\x00\x00\x00\x00") end - + its(:queue) { should eq('amq.gen-KduGSqQrpeUo1otnU0TWSA==') } its(:message_count) { should eq(0) } its(:consumer_count) { should eq(0) } end end - describe Bind do + RSpec.describe Bind do describe '.encode' do it 'encodes the parameters into a MethodFrame' do channel = 1 queue = 'hello.world' exchange = 'foo.bar' @@ -50,16 +47,16 @@ expect(method_frame.channel).to eq(1) end end end - # describe BindOk do + # RSpec.describe BindOk do # describe '.decode' do # end # end - describe Purge do + RSpec.describe Purge do describe '.encode' do it 'encodes the parameters into a MethodFrame' do channel = 1 queue = 'hello.world' nowait = false @@ -68,21 +65,21 @@ expect(method_frame.channel).to eq(1) end end end - describe PurgeOk do + RSpec.describe PurgeOk do describe '.decode' do subject do PurgeOk.decode("\x00\x00\x00\x02") end - + its(:message_count) { should eq(2) } end end - describe Delete do + RSpec.describe Delete do describe '.encode' do it 'encodes the parameters into a MethodFrame' do channel = 1 queue = 'hello.world' if_unused = false @@ -93,21 +90,21 @@ expect(method_frame.channel).to eq(1) end end end - describe DeleteOk do + RSpec.describe DeleteOk do describe '.decode' do subject do DeleteOk.decode("\x00\x00\x00\x02") end - + its(:message_count) { should eq(2) } end end - describe Unbind do + RSpec.describe Unbind do describe '.encode' do it 'encodes the parameters into a MethodFrame' do channel = 1 queue = 'hello.world' exchange = 'foo.bar' @@ -118,10 +115,10 @@ expect(method_frame.channel).to eq(1) end end end - # describe UnbindOk do + # RSpec.describe UnbindOk do # describe '.decode' do # end # end end end