fixing wrong file name

This commit is contained in:
Shiho Takagi
2015-01-26 22:30:19 +11:00
parent 04d61bd040
commit 2c4e768a3a

View File

@@ -0,0 +1,18 @@
module ElasticsearchHelpers
def sync_elasticsearch(crops)
if ENV['GROWSTUFF_ELASTICSEARCH'] == "true"
crops.each {|crop| crop.__elasticsearch__.index_document}
Crop.__elasticsearch__.refresh_index!
end
end
end
RSpec.configure do |config|
config.include ElasticsearchHelpers
config.before(:each) do
if ENV['GROWSTUFF_ELASTICSEARCH'] == "true"
Crop.__elasticsearch__.create_index! force: true
end
end
end