Sha256: 3a43c586908a5e923ac2f191a6d718422355b996e7dbae8b50b24a8cb49d74fe

Contents?: true

Size: 785 Bytes

Versions: 1

Compression:

Stored size: 785 Bytes

Contents

describe BunnyMock do

	context '::new' do

		it 'should return a new session' do
			expect(BunnyMock.new.class).to eq(BunnyMock::Session)
		end
	end

	context '::version' do

		it 'should return the current version' do
			expect(BunnyMock::VERSION).to_not be_nil
			expect(BunnyMock.version).to_not be_nil
		end
	end

	context '::protocol_version' do

		it 'should return the current amq protocol version' do
			expect(BunnyMock::PROTOCOL_VERSION).to eq('0.9.1')
			expect(BunnyMock.protocol_version).to eq('0.9.1')
		end
	end

  it 'should route messages from exchanges' do
    channel = BunnyMock.new.start.channel

    xchg = channel.topic 'xchg.topic'
    queue = channel.queue 'queue.test'

    queue.bind xchg
    xchg.publish('Routed message', routing_key: '*.test')
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
bunny-mock-1.3.0 spec/unit/bunny_mock_spec.rb