Configure rspec for elasticsearch

This commit is contained in:
Lars Henrik Mai 2016-02-17 20:46:03 +01:00
parent d790e97535
commit 9d1ab75015
2 changed files with 6 additions and 1 deletions

View file

@ -1,6 +1,6 @@
require 'rails_helper'
RSpec.describe SearchController, type: :controller do
RSpec.describe SearchController, type: :controller, elasticsearch: true do
describe "GET #index" do
it "returns http success" do

View file

@ -0,0 +1,5 @@
RSpec.configure do |config|
config.before :each, elasticsearch: true do
Paper.__elasticsearch__.create_index!(force: true)
end
end