spec/support/shared/destination_examples.rb in message-driver-0.1.0 vs spec/support/shared/destination_examples.rb in message-driver-0.2.0.rc1

- old
+ new

@@ -7,16 +7,15 @@ before do destination.publish(body, headers, properties) end context "the result" do - let!(:message) { destination.pop_message } - subject { message } + subject(:message) { destination.pop_message } it { should be_a MessageDriver::Message::Base } its(:body) { should eq(body) } - its(:headers) { should eq(headers) } + its(:headers) { should include(headers) } its(:properties) { should_not be_nil } end end end @@ -29,13 +28,13 @@ end end end shared_examples "supports #message_count" do - #FIXME this example fails on travis with the bunny adapter :( - it "reports it's message_count", :no_travis do + it "reports it's message_count" do expect { destination.publish("msg1") destination.publish("msg2") + pause_if_needed }.to change{destination.message_count}.by(2) end end