Skip to content

Commit

Permalink
After ruby-amqp/amq-client@81b089d, this example is no longer relevant
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelklishin committed Jan 19, 2012
1 parent 99b1f30 commit 8f9bbf7
Showing 1 changed file with 0 additions and 33 deletions.
Expand Up @@ -83,39 +83,6 @@
end
end

it 'should call after_publish callback' do
events = Array.new

channel3 = AMQP::Channel.new
exchange = channel3.fanout("amqpgem.tests.fanout0", :auto_delete => true)

channel3.confirm_select

#TODO make after_publish a real callback to avoid these meta gymnastics
after_publish = lambda do |*args|
events << :after_publish
end

if RUBY_VERSION < '1.9'
class AMQP::Channel
def singleton_class
class << self
self
end
end
end
end

channel3.singleton_class.send(:define_method, :after_publish, &after_publish)

EventMachine.add_timer(0.5) do
exchange.publish("Hi")
end

done(2.0) do
events.should include(:after_publish)
end
end

context "when messages are transient" do
context "and routable" do
Expand Down

0 comments on commit 8f9bbf7

Please sign in to comment.