Sha256: d66573352db8be36462e16b64b0438f0e781d22b5a97a6140fe380f8488394f6

Contents?: true

Size: 1.19 KB

Versions: 18

Compression:

Stored size: 1.19 KB

Contents

require 'rubygems'
require 'bundler/setup'
require 'pry'

require 'support/active_record'
require 'sidekiq'
require 'sidekiq/testing/inline'
require 'sidekiq/api'
require 'reactor'
require 'reactor/testing/matchers'

require 'rspec/its'

Sidekiq.configure_server do |config|
  config.redis = { url: ENV["REDISTOGO_URL"] }

  database_url = ENV['DATABASE_URL']
  if database_url
    ENV['DATABASE_URL'] = "#{database_url}?pool=25"
    ActiveRecord::Base.establish_connection
  end
end

Sidekiq.configure_client do |config|
  config.redis = { url: ENV["REDISTOGO_URL"] }
end


RSpec.configure do |config|
  # some (optional) config here

  # Runs Sidekiq jobs inline by default unless the RSpec metadata :sidekiq is specified,
  # in which case it will use the real Redis-backed Sidekiq queue
  config.before(:each, :sidekiq) do
    Sidekiq.redis{|r| r.flushall }
    Sidekiq::Testing.disable!
  end

  config.after(:each, :sidekiq) do
    Sidekiq::Testing.inline!
  end

  # Run specs in random order to surface order dependencies. If you find an
  # order dependency and want to debug it, you can fix the order by providing
  # the seed, which is printed after each run.
  #     --seed 1234
  config.order = "random"
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
reactor-0.13.0 spec/spec_helper.rb
reactor-0.12.2 spec/spec_helper.rb
reactor-0.12.1 spec/spec_helper.rb
reactor-0.11.4 spec/spec_helper.rb
reactor-0.11.2 spec/spec_helper.rb
reactor-0.11.1 spec/spec_helper.rb
reactor-0.11.0 spec/spec_helper.rb
reactor-0.10.1 spec/spec_helper.rb
reactor-0.10.0 spec/spec_helper.rb
reactor-0.9.9 spec/spec_helper.rb
reactor-0.9.8 spec/spec_helper.rb
reactor-0.9.7 spec/spec_helper.rb
reactor-0.9.6 spec/spec_helper.rb
reactor-0.9.5 spec/spec_helper.rb
reactor-0.9.4 spec/spec_helper.rb
reactor-0.9.2 spec/spec_helper.rb
reactor-0.9.1 spec/spec_helper.rb
reactor-0.9.0 spec/spec_helper.rb