Sha256: e00c481d9110f5e4a4c9004f99d4689735d0dbb2b8cf8cc56a79f198c2134e47

Contents?: true

Size: 1.3 KB

Versions: 7

Compression:

Stored size: 1.3 KB

Contents

$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
$LOAD_PATH.unshift(File.dirname(__FILE__))

Bundler.require

require 'aws'
require 'rake'
require 'tempfile'
require "sqlite3"


require 'dispatch-rider'
Dir['./spec/support/**/*.rb'].each { |fn| require(fn) }

FactoryGirl.definition_file_paths = %w{spec/factories/}
FactoryGirl.find_definitions

RSpec.configure do |config|
  config.raise_errors_for_deprecations!
  config.mock_with :rspec
  config.order = 'random'
  config.color = true
  config.tty = true
  config.mock_with :rspec do |mocks|
    mocks.yield_receiver_to_any_instance_implementation_blocks = false
  end

  config.include IntegrationSupport

  config.before(:suite) do
    FileUtils.mkdir_p "tmp"
    FileUtils.rm_f "tmp/lite.db"
    FileUtils.rm_rf "spectmp"
    SQLite3::Database.new "tmp/lite.db"
    ActiveRecord::Base.establish_connection adapter: :sqlite3, database: File.dirname(__FILE__) + "tmp/lite.db"
    ActiveRecord::Schema.define(version: 1) do
      extend DispatchRider::ScheduledJob::Migration
      create_scheduled_jobs_table
    end
  end

  config.before do
    DispatchRider.config.logger = NullLogger.new
  end

  config.after do
    DispatchRider::ScheduledJob.destroy_all
  end

  config.include FactoryGirl::Syntax::Methods
end

# Airbrake dummy module
module Airbrake
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
dispatch-rider-1.8.3 spec/spec_helper.rb
dispatch-rider-1.8.2 spec/spec_helper.rb
dispatch-rider-1.8.1 spec/spec_helper.rb
dispatch-rider-1.8.0 spec/spec_helper.rb
dispatch-rider-1.7.2 spec/spec_helper.rb
dispatch-rider-1.7.1 spec/spec_helper.rb
dispatch-rider-1.7.0 spec/spec_helper.rb