Sha256: c65b99cbb980e61764ee07c47e5228206e40ea798d8c763c325776b98d90019c
Contents?: true
Size: 882 Bytes
Versions: 28
Compression:
Stored size: 882 Bytes
Contents
# $:.unshift(File.expand_path('../../lib', __FILE__)) ENV['RACK_ENV'] = 'test' require 'snails' # require 'bundler' # Bundler.require(:default, :test) RSpec.configure do |config| def db_name ActiveRecord::Base.connection.instance_variable_get('@config')[:database] end def load_db! db_schema = "./db/schema.rb" if defined?(ActiveRecord) and File.exist?(db_schema) and db_name == ':memory:' puts "Loading in-memory database schema." load db_schema end end # config.include Capybara # config.include FactoryGirl::Syntax::Methods # config.include RequestHelpers, type: :request # config.include ControllerTestHelpers, type: :controller # config.expect_with(:rspec) { |c| c.syntax = :expect } # config.order = 'random' config.formatter = 'Fuubar' if defined?(Fuubar) config.color = true config.before(:suite) { load_db! } end
Version data entries
28 entries across 28 versions & 1 rubygems