Sha256: 52f5ba320e099564018494108f81b0c0cefdf4d07f0821c0ed4a48a6bff28e54
Contents?: true
Size: 1.34 KB
Versions: 2
Compression:
Stored size: 1.34 KB
Contents
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib')) $LOAD_PATH.unshift(File.dirname(__FILE__)) ENV['RAILS_ENV'] ||= 'test' SORCERY_ORM = :active_record # require 'simplecov' # SimpleCov.root File.join(File.dirname(__FILE__), '..', 'lib') # SimpleCov.start require 'rails/all' require 'rspec/rails' require 'timecop' def setup_orm; end def teardown_orm; end require "orm/#{SORCERY_ORM}" require 'rails_app/config/environment' class TestMailer < ActionMailer::Base; end Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each { |f| require f } RSpec.configure do |config| config.include RSpec::Rails::ControllerExampleGroup, file_path: /controller(.)*_spec.rb$/ config.mock_with :rspec config.use_transactional_fixtures = true config.before(:suite) { setup_orm } config.after(:suite) { teardown_orm } config.before(:each) { ActionMailer::Base.deliveries.clear } config.include ::Sorcery::TestHelpers::Internal config.include ::Sorcery::TestHelpers::Internal::Rails if begin Module.const_defined?('::Rails::Controller::Testing') rescue false end config.include ::Rails::Controller::Testing::TestProcess, type: :controller config.include ::Rails::Controller::Testing::TemplateAssertions, type: :controller config.include ::Rails::Controller::Testing::Integration, type: :controller end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
sorcery-0.10.1 | spec/spec_helper.rb |
sorcery-0.10.0 | spec/spec_helper.rb |