Sha256: 69499788408166c44fd9615645abb1469d44716dee3bd2a930d6db918cf4d589

Contents?: true

Size: 874 Bytes

Versions: 2

Compression:

Stored size: 874 Bytes

Contents

require 'rubygems'
require 'bundler'

Bundler.setup

require 'rspec'
require 'rcelery'
require 'spec/integration/tasks'
require 'timeout'


module Support
  def self.config
    {
      :application => ENV['RCELERY_APPLICATION'] || 'integration',
      :host =>        ENV['RCELERY_HOST'] || 'localhost',
      :port =>        ENV['RCELERY_PORT'] || 5672,
      :vhost =>       ENV['RCELERY_VHOST'] || '/integration',
      :username =>    ENV['RCELERY_USERNAME'] || 'guest',
      :password =>    ENV['RCELERY_PASSWORD'] || 'guest',
      :worker_count => ENV['RCELERY_WORKERS'] || 2
    }
  end
end

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

  config.before :all do
    RCelery.start(Support.config)
  end

  config.after :each do
    RCelery.queue.purge()
  end

  config.around :each do |example|
    Timeout.timeout(15) do
      example.run
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

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