Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Gracefully support #prefetch for queues by at least ignoring it

  • Loading branch information...
commit 88a5057b37833a6664b68aa5e72437b222934c41 1 parent 981d7a4
Larry Diehl authored
View
2  VERSION.yml
@@ -1,4 +1,4 @@
---
:major: 0
:minor: 1
-:patch: 2
+:patch: 3
View
4 lib/moqueue/mock_queue.rb
@@ -48,6 +48,10 @@ def received_message?(message_content)
def unsubscribe
true
end
+
+ def prefetch(size)
+ # noop
+ end
def received_ack_for_message?(message_content)
acked_messages.include?(message_content)
View
2  moqueue.gemspec
@@ -2,7 +2,7 @@
Gem::Specification.new do |s|
s.name = %q{moqueue}
- s.version = "0.1.2"
+ s.version = "0.1.3"
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
s.authors = ["Daniel DeLeo"]
View
6 spec/unit/mock_queue_spec.rb
@@ -87,6 +87,10 @@
pending ("should really remove the association with exchange")
@queue.should respond_to(:unsubscribe)
end
+
+ it "should ignore #prefetch but at least raise an error" do
+ lambda { @queue.prefetch(1337) }.should_not raise_error
+ end
it "should raise an error on double subscribe" do
@queue.subscribe { |msg| "once" }
@@ -138,4 +142,4 @@
queue.received_message?("I'm feelin this").should be_true
end
-end
+end
Please sign in to comment.
Something went wrong with that request. Please try again.