Permalink
Browse files

More test cleanup

  • Loading branch information...
ankane committed Sep 28, 2018
1 parent 69af51e commit 64f63d6c4f18cabe9935886cedd401255eebe2f9
Showing with 11 additions and 12 deletions.
  1. +11 −12 test/test_helper.rb
View
@@ -6,14 +6,15 @@
require "active_support/core_ext" if defined?(NoBrainer)
require "active_support/notifications"
Searchkick.index_suffix = ENV["TEST_ENV_NUMBER"] # for parallel tests
ENV["RACK_ENV"] = "test"
$logger = ActiveSupport::Logger.new(ENV["VERBOSE"] ? STDOUT : nil)
Searchkick.client.transport.logger = $logger
Searchkick.search_timeout = 5
Searchkick.index_suffix = ENV["TEST_ENV_NUMBER"] # for parallel tests
puts "Running against Elasticsearch #{Searchkick.server_version}"
if defined?(Redis)
if defined?(ConnectionPool)
@@ -23,8 +24,6 @@
end
end
puts "Running against Elasticsearch #{Searchkick.server_version}"
I18n.config.enforce_available_locales = true
if defined?(ActiveJob)
@@ -34,14 +33,6 @@
ActiveSupport::LogSubscriber.logger = ActiveSupport::Logger.new(STDOUT) if ENV["NOTIFICATIONS"]
def nobrainer?
defined?(NoBrainer)
end
def cequel?
defined?(Cequel)
end
if defined?(Mongoid)
require_relative "support/mongoid"
elsif defined?(NoBrainer)
@@ -124,4 +115,12 @@ def with_options(klass, options)
klass.searchkick_options.merge!(previous_options)
end
end
def nobrainer?
defined?(NoBrainer)
end
def cequel?
defined?(Cequel)
end
end

0 comments on commit 64f63d6

Please sign in to comment.