RAILS_ENV = 'test' # –––––––––––– # Dependencies # –––––––––––– $LOAD_PATH.unshift File.expand_path('../support/models', __FILE__) require 'gummi' require 'db/person' require 'db/rating' require 'db/ship' def setup_elastic Gummi::DbLayer::DefaultIndex.setup DB::Person.sync_mapping! DB::Rating.sync_mapping! DB::Ship.sync_mapping! end RSpec.configure do |config| config.before(:suite) do setup_elastic end config.before(:each, elastic: true) do setup_elastic end config.after(:each, elastic: true) do Gummi::DbLayer::DefaultIndex.teardown end config.after(:suite) do Gummi::DbLayer::DefaultIndex.teardown end end