Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorSean McGivern <sean@gitlab.com>2018-12-04 11:36:43 +0300
committerSean McGivern <sean@gitlab.com>2018-12-04 11:36:43 +0300
commit64f858883074db1c45bfa5ab1fa709c493dea062 (patch)
treec8de555aeb7e8343065f28153210b107e0929ac7 /doc
parent83f0798e7dc588f0e4cb6816daadeef7dbfc8b81 (diff)
parentb8a6d57bc84e6ef27468d80fdcf415139f67831e (diff)
Merge branch 'docs-update-expect_next_instance_of' into 'master'
Make docs about expect_next_instance_of consistent See merge request gitlab-org/gitlab-ce!23507
Diffstat (limited to 'doc')
-rw-r--r--doc/development/gotchas.md6
1 files changed, 3 insertions, 3 deletions
diff --git a/doc/development/gotchas.md b/doc/development/gotchas.md
index 84dea7ce9aa..a5a34d82bec 100644
--- a/doc/development/gotchas.md
+++ b/doc/development/gotchas.md
@@ -92,7 +92,7 @@ describe API::Labels do
end
```
-## Avoid using `allow_any_instance_of` in RSpec
+## Avoid using `expect_any_instance_of` or `allow_any_instance_of` in RSpec
### Why
@@ -102,7 +102,7 @@ end
error like this:
```
- 1.1) Failure/Error: allow_any_instance_of(ApplicationSetting).to receive_messages(messages)
+ 1.1) Failure/Error: expect_any_instance_of(ApplicationSetting).to receive_messages(messages)
Using `any_instance` to stub a method (elasticsearch_indexing) that has been defined on a prepended module (EE::ApplicationSetting) is not supported.
```
@@ -112,7 +112,7 @@ Instead of writing:
```ruby
# Don't do this:
-allow_any_instance_of(Project).to receive(:add_import_job)
+expect_any_instance_of(Project).to receive(:add_import_job)
```
We could write: