Sha256: 6ba7c91f7351c5150f2eebbc0283d19949a52448c8df80c3c85919d94d1b1c8c

Contents?: true

Size: 948 Bytes

Versions: 2

Compression:

Stored size: 948 Bytes

Contents

ENV["RAILS_ENV"] ||= 'test'
DOORKEEPER_ORM = (ENV["DOORKEEPER_ORM"] || :active_record).to_sym

$:.unshift File.dirname(__FILE__)

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

puts "====> Doorkeeper.orm = #{Doorkeeper.configuration.orm.inspect}"
puts "====> Rails version: #{Rails.version}"
puts "====> Ruby version: #{RUBY_VERSION}"

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

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.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
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
doorkeeper-0.5.0 spec/spec_helper_integration.rb
doorkeeper-0.5.0.rc1 spec/spec_helper_integration.rb