$LOAD_PATH.unshift File.expand_path('../../lib', __FILE__) require 'coveralls' Coveralls.wear! require 'activemodel/associations' ActiveModel::Associations::Hooks.init ActiveRecord::Base.establish_connection( adapter: "sqlite3", database: ":memory:" ) # Test Class class User < ActiveRecord::Base; end ActiveRecord::Migration.verbose = false ActiveRecord::Migrator.migrate File.expand_path("../db/migrate", __FILE__), nil require 'database_cleaner' RSpec.configure do |config| config.order = :random config.before(:suite) do DatabaseCleaner.strategy = :transaction DatabaseCleaner.clean_with(:truncation) end config.before(:each) do DatabaseCleaner.start end config.after(:each) do DatabaseCleaner.clean end end