Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- require 'spec_helper'
- require "bunny"
- describe "RabbitMQ" do
- it 'should send and recieve a message' do
- TestBunny.send("test", "hello")
- message = TestBunny.subscribe("test")
- expect(message).to_not eq(nil)
- end
- it 'consumer should recieve the correct message' do
- correct_message = "iamcorrect"
- TestBunny.send("test", correct_message)
- message = TestBunny.subscribe("test")
- expect(message).to eq(correct_message)
- end
- it 'should be able to create a new Bunny connection' do
- pass = false
- begin
- TestBunny.connect
- pass = true
- rescue
- end
- expect(pass).to eq(true)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement