Skip to content

Instantly share code, notes, and snippets.

@mikekr1
Created April 28, 2017 12:39
Show Gist options
  • Save mikekr1/4a36d0abb04ddc3b62a986e37fb9900a to your computer and use it in GitHub Desktop.
Save mikekr1/4a36d0abb04ddc3b62a986e37fb9900a to your computer and use it in GitHub Desktop.
require 'es_spec_helper'
RSpec.describe 'ES search' do
before :all do
#Generate test data in db, using FactoryGirl for example
Integrations::EsSpecHelper.create_index(name: 'test_index', mapping: INDEX_DEFINITION)
#Use ETL to load data
SampleETL.populate_index('test_index')
Integrations::EsSpecHelper.flush_index(name: 'test_index')
end
after :all do
Integrations::EsSpecHelper.remove_index(name: 'test_index')
end
#SPECS GO HERE
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment