diff options
author | Stan Hu <stanhu@gmail.com> | 2018-04-09 16:46:33 +0300 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2018-04-09 16:46:33 +0300 |
commit | 63cadbe1ad194e95920a9ece6b3cb7fdffc4d84b (patch) | |
tree | 9252de656a0ae97e18283b20bb8f00f34a8bba41 /app/workers | |
parent | 13c6d6eabe70852aeffb7cadfbd170f1cc79fced (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.rb | 8 |
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) |