1

如何覆盖日志格式serverspec并提取到单独的文件中?我能够做到这一点,但无法提取到单独的文件中。

我的代码片段是:

RSpec.configure do |c|
  c.output_stream = File.open('serverspec-result.json', 'w')
end

当我跑步时kitchen test,它给了我以下警告:

RSpec's reporter has already been initialized with 
#<IO:<STDOUT>> as the output stream,
so your change to `output_stream` will be ignored. 
You should configure it earlier for it to take effect.
4

0 回答 0