📜  rspec 日志到控制台 - 任何代码示例

📅  最后修改于: 2022-03-11 15:00:04.248000             🧑  作者: Mango

代码示例1
# output to go into the log file (i.e logs/test.log)
Rails.logger.debug variable.inspect
Rails.logger.debug variable.to_yaml

# output in the console
require 'pp'

it 'does something'
    thing = Factory(:something)
    pp thing
end

# or
put s thing.to_yaml