Sha256: 054efb5ca4ffc73b56e6b9ed39d7bd5667d51ad88f5ace611e8f7792708652aa

Contents?: true

Size: 1.49 KB

Versions: 5

Compression:

Stored size: 1.49 KB

Contents

ENV['RAILS_ENV'] ||= 'test'
DOORKEEPER_ORM = (ENV['orm'] || :active_record).to_sym
TABLE_NAME_PREFIX = ENV['table_name_prefix'] || nil
TABLE_NAME_SUFFIX = ENV['table_name_suffix'] || nil

$LOAD_PATH.unshift File.dirname(__FILE__)

require 'capybara/rspec'
require 'rspec/active_model/mocks'
require 'dummy/config/environment'
require 'rspec/rails'
require 'rspec/autorun'
require 'generator_spec/test_case'
require 'timecop'
require 'database_cleaner'

Rails.logger.info "====> Doorkeeper.orm = #{Doorkeeper.configuration.orm.inspect}"
if Doorkeeper.configuration.orm == :active_record
  Rails.logger.info "======> active_record.table_name_prefix = #{Rails.configuration.active_record.table_name_prefix.inspect}"
  Rails.logger.info "======> active_record.table_name_suffix = #{Rails.configuration.active_record.table_name_suffix.inspect}"
end
Rails.logger.info "====> Rails version: #{Rails.version}"
Rails.logger.info "====> Ruby version: #{RUBY_VERSION}"

require "support/orm/#{Doorkeeper.configuration.orm_name}"

ENGINE_RAILS_ROOT = File.join(File.dirname(__FILE__), '../')

Dir["#{File.dirname(__FILE__)}/support/{dependencies,helpers,shared}/*.rb"].each { |f| require f }

RSpec.configure do |config|
  config.infer_spec_type_from_file_location!
  config.mock_with :rspec

  config.infer_base_class_for_anonymous_controllers = false

  config.before do
    DatabaseCleaner.start
    Doorkeeper.configure { orm DOORKEEPER_ORM }
  end

  config.after do
    DatabaseCleaner.clean
  end

  config.order = 'random'
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
doorkeeper-1.4.2 spec/spec_helper_integration.rb
doorkeeper-1.4.1 spec/spec_helper_integration.rb
doorkeeper-2.0.0.alpha1 spec/spec_helper_integration.rb
doorkeeper-1.4.0 spec/spec_helper_integration.rb
doorkeeper-1.3.1 spec/spec_helper_integration.rb