diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-06-09 21:11:25 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-06-09 21:11:25 +0300 |
commit | d40d684afaec767bb05efdbeaa4ce3620cd337bb (patch) | |
tree | a6c61c8bc90f05a2ddf6817863d364239a5357ce /spec/support/matchers | |
parent | c0f42c6d662b776777afbf79ba72d8e833b8de48 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/support/matchers')
-rw-r--r-- | spec/support/matchers/be_one_of.rb | 11 |
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 |