Skip to content
代码片段 群组 项目
提交 31756894 编辑于 作者: Arturo Herrero's avatar Arturo Herrero
浏览文件

Docs: Update Gotchas page with comment clarifications

上级 b70abe63
No related branches found
No related tags found
无相关合并请求
...@@ -114,6 +114,7 @@ Instead of writing: ...@@ -114,6 +114,7 @@ Instead of writing:
# Don't do this: # Don't do this:
expect_any_instance_of(Project).to receive(:add_import_job) expect_any_instance_of(Project).to receive(:add_import_job)
# Don't do this:
allow_any_instance_of(Project).to receive(:add_import_job) allow_any_instance_of(Project).to receive(:add_import_job)
``` ```
...@@ -125,6 +126,7 @@ expect_next_instance_of(Project) do |project| ...@@ -125,6 +126,7 @@ expect_next_instance_of(Project) do |project|
expect(project).to receive(:add_import_job) expect(project).to receive(:add_import_job)
end end
# Do this:
allow_next_instance_of(Project) do |project| allow_next_instance_of(Project) do |project|
allow(project).to receive(:add_import_job) allow(project).to receive(:add_import_job)
end end
......
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册