summaryrefslogtreecommitdiffstats
path: root/spec
diff options
context:
space:
mode:
authorJosh Cooper <josh@puppetlabs.com>2011-04-19 13:46:33 -0700
committerJosh Cooper <josh@puppetlabs.com>2011-04-19 13:46:33 -0700
commit0d1e81948fb4c5430714d63a2e3ef66b32f98fad (patch)
treeb0d43c6b6cc32c8bf65897b91039ea58edecd57d /spec
parent485501a55e99b51cf8c9affa07a9f873a6cbc951 (diff)
parent7d3c30323efa5c2de2282395bc4105fef8b19e50 (diff)
downloadpuppet-0d1e81948fb4c5430714d63a2e3ef66b32f98fad.tar.gz
puppet-0d1e81948fb4c5430714d63a2e3ef66b32f98fad.tar.xz
puppet-0d1e81948fb4c5430714d63a2e3ef66b32f98fad.zip
Merge remote-tracking branch 'jamtur01/tickets/master/7166' into next
Diffstat (limited to 'spec')
-rwxr-xr-xspec/integration/indirector/catalog/queue_spec.rb4
-rwxr-xr-xspec/unit/indirector/queue_spec.rb8
-rwxr-xr-xspec/unit/util/queue/stomp_spec.rb20
3 files changed, 16 insertions, 16 deletions
diff --git a/spec/integration/indirector/catalog/queue_spec.rb b/spec/integration/indirector/catalog/queue_spec.rb
index 569f096bf..940c8bab8 100755
--- a/spec/integration/indirector/catalog/queue_spec.rb
+++ b/spec/integration/indirector/catalog/queue_spec.rb
@@ -19,13 +19,13 @@ describe "Puppet::Resource::Catalog::Queue", :if => Puppet.features.pson? do
after { Puppet.settings.clear }
- it "should render catalogs to pson and send them via the queue client when catalogs are saved" do
+ it "should render catalogs to pson and publish them via the queue client when catalogs are saved" do
terminus = Puppet::Resource::Catalog.indirection.terminus(:queue)
client = mock 'client'
terminus.stubs(:client).returns client
- client.expects(:send_message).with(:catalog, @catalog.to_pson)
+ client.expects(:publish_message).with(:catalog, @catalog.to_pson)
request = Puppet::Indirector::Request.new(:catalog, :save, "foo", :instance => @catalog)
diff --git a/spec/unit/indirector/queue_spec.rb b/spec/unit/indirector/queue_spec.rb
index b84ed2aea..eba136bbc 100755
--- a/spec/unit/indirector/queue_spec.rb
+++ b/spec/unit/indirector/queue_spec.rb
@@ -60,20 +60,20 @@ describe Puppet::Indirector::Queue, :if => Puppet.features.pson? do
describe "when saving" do
it 'should render the instance using pson' do
@subject.expects(:render).with(:pson)
- @store.client.stubs(:send_message)
+ @store.client.stubs(:publish_message)
@store.save(@request)
end
- it "should send the rendered message to the appropriate queue on the client" do
+ it "should publish the rendered message to the appropriate queue on the client" do
@subject.expects(:render).returns "mypson"
- @store.client.expects(:send_message).with(:my_queue, "mypson")
+ @store.client.expects(:publish_message).with(:my_queue, "mypson")
@store.save(@request)
end
it "should catch any exceptions raised" do
- @store.client.expects(:send_message).raises ArgumentError
+ @store.client.expects(:publish_message).raises ArgumentError
lambda { @store.save(@request) }.should raise_error(Puppet::Error)
end
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