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:
Diffstat (limited to 'spec/support/matchers/be_executed.rb')
-rw-r--r--spec/support/matchers/be_executed.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/spec/support/matchers/be_executed.rb b/spec/support/matchers/be_executed.rb
new file mode 100644
index 00000000000..fea86386755
--- /dev/null
+++ b/spec/support/matchers/be_executed.rb
@@ -0,0 +1,11 @@
+# frozen_string_literal: true
+
+# named as `get_executed` to avoid clashing
+# with `be_executed === have_attributes(executed: true)`
+RSpec::Matchers.define :get_executed do |args = []|
+ include AfterNextHelpers
+
+ match do |service_class|
+ expect_next(service_class, *args).to receive(:execute)
+ end
+end