Skip to content

Commit

Permalink
特定のtestではelascticsearchを立ち上げるようにする
Browse files Browse the repository at this point in the history
  • Loading branch information
suusan2go committed Feb 14, 2016
1 parent 59fe1a8 commit 8e707c0
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions spec/rails_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
abort("The Rails environment is running in production mode!") if Rails.env.production?
require 'spec_helper'
require 'rspec/rails'
require 'elasticsearch/extensions/test/cluster'

# Add additional requires below this line. Rails is not loaded until this point!

# Requires supporting ruby files with custom matchers and macros, etc, in
Expand Down Expand Up @@ -57,4 +59,15 @@
config.include FactoryGirl::Syntax::Methods

config.render_views

config.before(:suite) do
Elasticsearch::Extensions::Test::Cluster.
start(nodes: 1, path_logs: './log/elasticsearch_test.log')
end

config.after(:suite) do
Elasticsearch::Extensions::Test::Cluster.stop
end
end
end
end

0 comments on commit 8e707c0

Please sign in to comment.