Skip to content

Remove use of any_instance_of in runner spec

Yorick Peterse requested to merge build-finished-worker-spec-prepend into master

What does this MR do?

In EE we prepend a module into BuildFinishedWorker. This would cause this spec to fail because RSpec doesn't support the use of
"any_instance_of" with classes that include a prepended module.

To work around this we just stub the "perform_async" class method
instead of stubbing the "perform" instance method.

This is necessary to get the tests for https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/4466 to pass.

EE MR: https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/4763

Does this MR meet the acceptance criteria?

Edited by Yorick Peterse

Merge request reports

Loading