require 'bundler/setup' Bundler.setup # Configure Rails Environment ENV["RAILS_ENV"] = "test" require File.expand_path("../../spec/dummy/config/environment.rb", __FILE__) ActiveRecord::Migrator.migrations_paths = [File.expand_path("../../spec/dummy/db/migrate", __FILE__)] require "rails/test_help" # Filter out Minitest backtrace while allowing backtrace from other libraries # to be shown. # Minitest.backtrace_filter = Minitest::BacktraceFilter.new ActiveRecord::Base.configurations = YAML.load_file(File.join(File.dirname(__FILE__), 'config/database.yml')) ActiveRecord::Base.establish_connection(:test) # Load support files Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each { |f| require f } RSpec.configure do |config| config.expect_with :rspec do |c| c.syntax = :expect end end