在我的rspec测试中,我有很多深层嵌套的上下文:
describe "#mymethod"
it_behaves_like "specific object"
end
shared_examples_for "specific object" do
context "when it receives proper parameters" do
context "when file is in a queue" do
it "behaves as i want it to" do
#...
end
end
end
因此,当我运行我的rspec测试时,我会在“待定”/“失败”/“失败的示例”部分中获得类似(或更复杂)的结果:
mymethod behaves like specific object when it receives proper parameters when file is in a queue behaves as i want it to
由于缺少分隔符,这些上下文字符串有时往往不可读。
我怎样才能自动修补rspec来添加它们(f.ex。“|”)(还是有其他首选解决方案)?描述符字符串在rspec中连接在哪里?