Created
January 10, 2016 14:24
-
-
Save aldesantis/e1e5c6b46d3f0f0c4972 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ENV['RAILS_ENV'] ||= 'test' | |
ENGINE_ROOT = File.join(File.dirname(__FILE__), '../') | |
# Load environment.rb from the dummy app. | |
require File.expand_path('../dummy/config/environment', __FILE__) | |
abort("The Rails environment is running in production mode!") if Rails.env.production? | |
require 'spec_helper' | |
require 'rspec/rails' | |
# Load RSpec helpers. | |
Dir[File.join(ENGINE_ROOT, 'spec/support/**/*.rb')].each { |f| require f } | |
# Load migrations from the dummy app. | |
ActiveRecord::Migrator.migrations_paths = File.join(ENGINE_ROOT, 'spec/dummy/db/migrate') | |
ActiveRecord::Migration.maintain_test_schema! | |
RSpec.configure do |config| | |
config.infer_spec_type_from_file_location! | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment