spec/spec_09/exchange_spec.rb in bunny-0.5.2 vs spec/spec_09/exchange_spec.rb in bunny-0.5.3
- old
+ new
@@ -113,10 +113,17 @@
it "should be able to publish a message" do
exch = @b.exchange('direct_exchange')
exch.publish('This is a published message')
end
+
+ it "should not modify the passed options hash when publishing a message" do
+ exch = @b.exchange('direct_exchange')
+ opts = {:key => 'a', :persistent => true}
+ exch.publish('', opts)
+ opts.should == {:key => 'a', :persistent => true}
+ end
it "should be able to return an undeliverable message" do
exch = @b.exchange('')
exch.publish('This message should be undeliverable', :immediate => true)
ret_msg = @b.returned_message
@@ -134,6 +141,6 @@
it "should ignore the :nowait option when deleted" do
exch = @b.exchange('direct2_exchange')
exch.delete(:nowait => true)
end
-end
\ No newline at end of file
+end