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:
authorStan Hu <stanhu@gmail.com>2018-04-09 16:46:33 +0300
committerStan Hu <stanhu@gmail.com>2018-04-09 16:46:33 +0300
commit63cadbe1ad194e95920a9ece6b3cb7fdffc4d84b (patch)
tree9252de656a0ae97e18283b20bb8f00f34a8bba41 /app/workers
parent13c6d6eabe70852aeffb7cadfbd170f1cc79fced (diff)
Work around Ruby 2.3.7 bug by defining prepended class methods needed for tests
Diffstat (limited to 'app/workers')
-rw-r--r--app/workers/authorized_projects_worker.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/app/workers/authorized_projects_worker.rb b/app/workers/authorized_projects_worker.rb
index d7e24491516..8fe3619f6ee 100644
--- a/app/workers/authorized_projects_worker.rb
+++ b/app/workers/authorized_projects_worker.rb
@@ -2,6 +2,14 @@ class AuthorizedProjectsWorker
include ApplicationWorker
prepend WaitableWorker
+ # This is a workaround for a Ruby 2.3.7 bug. rspec-mocks cannot restore the
+ # visibility of prepended modules. See https://github.com/rspec/rspec-mocks/issues/1231
+ # for more details.
+ if Rails.env.test?
+ def self.bulk_perform_and_wait(args_list, timeout: 10)
+ end
+ end
+
def perform(user_id)
user = User.find_by(id: user_id)