mirror of
https://github.com/Growstuff/growstuff.git
synced 2026-03-23 09:11:39 -04:00
fixing wrong file name
This commit is contained in:
18
spec/support/elasticsearch_helpers.rb
Normal file
18
spec/support/elasticsearch_helpers.rb
Normal 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
|
||||
Reference in New Issue
Block a user