Skip to content

Commit f6dc1d7

Browse files
committed
Suppress Mongo log output in specs
Just to put the focus on the green dots
1 parent 94157f7 commit f6dc1d7

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
*.gem
22
.yardoc
3+
spec/mongo.log
34

45
coverage.data/
56
coverage/

spec/spec_helper.rb

+4
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,10 @@ def mongodb_version
4545
)
4646
end
4747

48+
if defined?(Mongo)
49+
Mongo::Logger.logger = Logger.new("./spec/mongo.log")
50+
end
51+
4852
RSpec.configure do |config|
4953
config.include Mongoid::SpecHelpers
5054
config.raise_errors_for_deprecations!

0 commit comments

Comments
 (0)