diff options
| author | James Turnbull <james@lovedthanlost.net> | 2011-04-20 02:35:40 +1000 |
|---|---|---|
| committer | James Turnbull <james@lovedthanlost.net> | 2011-04-20 02:35:40 +1000 |
| commit | 7d3c30323efa5c2de2282395bc4105fef8b19e50 (patch) | |
| tree | aefea20994f90ab911812a082f04c7b41dbdbf96 /spec/unit/util | |
| parent | 97e9e5f223cb7baefd52456e2324c592fe415dca (diff) | |
| download | puppet-7d3c30323efa5c2de2282395bc4105fef8b19e50.tar.gz puppet-7d3c30323efa5c2de2282395bc4105fef8b19e50.tar.xz puppet-7d3c30323efa5c2de2282395bc4105fef8b19e50.zip | |
Fixed #7166 - Replaced deprecated stomp "send" method with "publish"
The "send" method in the stomp gem has been deprecated since:
http://gitorious.org/stomp/mainline/commit/d542a976028cb4c5badcbb69e3383e746721e44c
It's been replaced with the "publish" method.
Also renamed the send_message method to publish_message more in
keeping with language used in queuing.
Diffstat (limited to 'spec/unit/util')
| -rwxr-xr-x | spec/unit/util/queue/stomp_spec.rb | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/spec/unit/util/queue/stomp_spec.rb b/spec/unit/util/queue/stomp_spec.rb index f67189cf5..99c77d0b4 100755 --- a/spec/unit/util/queue/stomp_spec.rb +++ b/spec/unit/util/queue/stomp_spec.rb @@ -63,26 +63,26 @@ describe 'Puppet::Util::Queue::Stomp', :if => Puppet.features.stomp? do end end - describe "when sending a message" do + describe "when publishing a message" do before do @client = stub 'client' Stomp::Client.stubs(:new).returns @client @queue = Puppet::Util::Queue::Stomp.new end - it "should send it to the queue client instance" do - @client.expects(:send).with { |queue, msg, options| msg == "Smite!" } - @queue.send_message('fooqueue', 'Smite!') + it "should publish it to the queue client instance" do + @client.expects(:publish).with { |queue, msg, options| msg == "Smite!" } + @queue.publish_message('fooqueue', 'Smite!') end - it "should send it to the transformed queue name" do - @client.expects(:send).with { |queue, msg, options| queue == "/queue/fooqueue" } - @queue.send_message('fooqueue', 'Smite!') + it "should publish it to the transformed queue name" do + @client.expects(:publish).with { |queue, msg, options| queue == "/queue/fooqueue" } + @queue.publish_message('fooqueue', 'Smite!') end - it "should send it as a persistent message" do - @client.expects(:send).with { |queue, msg, options| options[:persistent] == true } - @queue.send_message('fooqueue', 'Smite!') + it "should publish it as a persistent message" do + @client.expects(:publish).with { |queue, msg, options| options[:persistent] == true } + @queue.publish_message('fooqueue', 'Smite!') end end |
