Sha256: b8c7311ad161f5a431887078d064c67939bfd73bcfd51641b6b0ca5ec095b47e

Contents?: true

Size: 1.13 KB

Versions: 4

Compression:

Stored size: 1.13 KB

Contents

# frozen_string_literal: true

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

require 'active_record'
ActiveRecord::Migration.verbose = false

require 'combustion'
Combustion.initialize! :active_record

require 'rspec/rails'
require 'webmock/rspec'
require 'factory_girl'
require 'simplecov'

require 'global_registry_bindings'
require 'global_registry_bindings/testing'

require 'sidekiq/testing'
require 'sidekiq_unique_jobs/testing'
Sidekiq::Testing.fake!

require 'mock_redis'
MOCK_REDIS = MockRedis.new

ActionController::Base.cache_store = :memory_store

require 'helpers/sidekiq_helpers'

RSpec.configure do |config|
  config.use_transactional_fixtures = true
  config.file_fixture_path = 'spec/fixtures'
  config.filter_run focus: true
  config.run_all_when_everything_filtered = true
  config.include ActiveSupport::Testing::TimeHelpers
  config.include FactoryGirl::Syntax::Methods
  config.include SidekiqHelpers

  config.before(:suite) do
    FactoryGirl.find_definitions
  end

  config.before(:each) do
    allow(Sidekiq).to receive(:redis).and_yield(MOCK_REDIS)

    clear_sidekiq_jobs_and_locks

    Rails.cache.clear
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
global-registry-bindings-0.6.2 spec/spec_helper.rb
global-registry-bindings-0.6.1 spec/spec_helper.rb
global-registry-bindings-0.6.0 spec/spec_helper.rb
global-registry-bindings-0.5.0 spec/spec_helper.rb