JSON 格式化程序
为重试格式化示例名称
给定一个名为“various_spec.rb”的文件,其中包含
RSpec.describe "Various" do
it "fails" do
expect("fail").to eq("succeed")
end
it "succeeds" do
expect("succeed").to eq("succeed")
end
it "pends"
end
当我运行 rspec various_spec.rb --format j
那么输出应该包含所有这些
“summary_line”:“3 个示例,1 个失败,1 个待定” |
“examples”:[ |
“description”:“失败” |
“full_description”:“各种失败” |
“status”:“失败” |
“filepath”:“./variousspec.rb” |
“line_number”:2 |
“exception”:{ |
“class”:“RSpec::Expectations::ExpectationNotMetError” |
以及退出状态应为 1。