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
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2019-11-07 18:06:33 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2019-11-07 18:06:33 +0300
commit90a06a20be61bb6d48d77746091492831153e075 (patch)
treebdba99289605f8b5acf12159d02aeb23f8690202 /spec/controllers/snippets_controller_spec.rb
parent84a0e65ac88c7a3db86a0e4347606ba093490bef (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/controllers/snippets_controller_spec.rb')
-rw-r--r--spec/controllers/snippets_controller_spec.rb12
1 files changed, 9 insertions, 3 deletions
diff --git a/spec/controllers/snippets_controller_spec.rb b/spec/controllers/snippets_controller_spec.rb
index e892c736c69..054d448c28d 100644
--- a/spec/controllers/snippets_controller_spec.rb
+++ b/spec/controllers/snippets_controller_spec.rb
@@ -251,7 +251,9 @@ describe SnippetsController do
context 'when the snippet is spam' do
before do
- allow_any_instance_of(AkismetService).to receive(:spam?).and_return(true)
+ allow_next_instance_of(AkismetService) do |instance|
+ allow(instance).to receive(:spam?).and_return(true)
+ end
end
context 'when the snippet is private' do
@@ -323,7 +325,9 @@ describe SnippetsController do
context 'when the snippet is spam' do
before do
- allow_any_instance_of(AkismetService).to receive(:spam?).and_return(true)
+ allow_next_instance_of(AkismetService) do |instance|
+ allow(instance).to receive(:spam?).and_return(true)
+ end
end
context 'when the snippet is private' do
@@ -431,7 +435,9 @@ describe SnippetsController do
let(:snippet) { create(:personal_snippet, :public, author: user) }
before do
- allow_any_instance_of(AkismetService).to receive_messages(submit_spam: true)
+ allow_next_instance_of(AkismetService) do |instance|
+ allow(instance).to receive_messages(submit_spam: true)
+ end
stub_application_setting(akismet_enabled: true)
end