gitlab-org--gitlab-foss/spec/support/matchers/be_one_of.rb

11 lines
234 B
Ruby

# 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