Sha256: 37033eef36fb1214dfd95bbfd309bea602dd37ede8b38f90b2d7b34d2aa8cc6b

Contents?: true

Size: 554 Bytes

Versions: 2

Compression:

Stored size: 554 Bytes

Contents

require 'rubygems'
require 'bundler'

Bundler.setup

require 'rspec'
require 'rcelery'

module AMQPMock
  def stub_amqp
    queue = stub!.bind { queue }.subject
    stub(queue).subscribe { queue }
    stub(queue).unsubscribe { queue }
    channel = stub!.direct.subject
    stub(channel).topic
    stub(channel).queue { queue }

    stub(RCelery).channel{ channel }

    [channel, queue]
  end
end

RSpec.configure do |config|
  config.mock_with :rr

  config.before :all do
    stub(AMQP).start
    stub(AMQP).stop
  end

  config.include AMQPMock
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
rcelery-1.0.1 spec/spec_helper.rb
rcelery-1.0.0 spec/spec_helper.rb