Commit cd6cd422df9e66c5638ac4b8ede6587b10e49ec3
1 parent
88893ca1
Exists in
master
and in
17 other branches
Better test logging [skip ci]
Showing
4 changed files
with
7 additions
and
5 deletions
Show diff stats
test/support/activerecord.rb
test/support/cequel.rb
... | ... | @@ -5,7 +5,7 @@ cequel = |
5 | 5 | keyspace: "searchkick_test", |
6 | 6 | default_consistency: :all |
7 | 7 | ) |
8 | -cequel.logger = ActiveSupport::Logger.new(STDOUT) if ENV["VERBOSE"] | |
8 | +cequel.logger = $logger | |
9 | 9 | cequel.schema.drop! if cequel.schema.exists? |
10 | 10 | cequel.schema.create! |
11 | 11 | Cequel::Record.connection = cequel | ... | ... |
test/support/mongoid.rb
test/test_helper.rb
... | ... | @@ -10,7 +10,9 @@ Searchkick.index_suffix = ENV["TEST_ENV_NUMBER"] |
10 | 10 | |
11 | 11 | ENV["RACK_ENV"] = "test" |
12 | 12 | |
13 | -Searchkick.client.transport.logger = ActiveSupport::Logger.new(STDOUT) if ENV["VERBOSE"] | |
13 | +$logger = ActiveSupport::Logger.new(ENV["VERBOSE"] ? STDOUT : nil) | |
14 | + | |
15 | +Searchkick.client.transport.logger = $logger | |
14 | 16 | Searchkick.search_timeout = 5 |
15 | 17 | |
16 | 18 | if defined?(Redis) | ... | ... |