Avoid db:dev_seed log print when run from its test
The db:dev_seed rake logs info as it progresses as information for the developer. But that's not needed when ran from its tests file, and it bloats the travis/rspec output with unnecessary information. Now the task will always log info unless the rake task receives an optional argument.
This commit is contained in:
@@ -1,7 +1,9 @@
|
||||
require 'database_cleaner'
|
||||
DatabaseCleaner.clean_with :truncation
|
||||
@logger = Logger.new(STDOUT)
|
||||
@logger.formatter = proc { |_severity, _datetime, _progname, msg| msg }
|
||||
@logger.formatter = proc do |_severity, _datetime, _progname, msg|
|
||||
msg unless @avoid_log
|
||||
end
|
||||
|
||||
def section(section_title)
|
||||
@logger.info section_title
|
||||
|
||||
Reference in New Issue
Block a user