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>2021-06-09 21:11:25 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2021-06-09 21:11:25 +0300
commitd40d684afaec767bb05efdbeaa4ce3620cd337bb (patch)
treea6c61c8bc90f05a2ddf6817863d364239a5357ce /spec/support/matchers
parentc0f42c6d662b776777afbf79ba72d8e833b8de48 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/support/matchers')
-rw-r--r--spec/support/matchers/be_one_of.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/spec/support/matchers/be_one_of.rb b/spec/support/matchers/be_one_of.rb
new file mode 100644
index 00000000000..16ee32b67c3
--- /dev/null
+++ b/spec/support/matchers/be_one_of.rb
@@ -0,0 +1,11 @@
+# frozen_string_literal: true
+
+RSpec::Matchers.define :be_one_of do |collection|
+ match do |item|
+ expect(collection).to include(item)
+ end
+
+ failure_message do |item|
+ "expected #{item} to be one of #{collection}"
+ end
+end