debian-mirror-gitlab/spec/support/matchers/be_one_of.rb

12 lines
234 B
Ruby
Raw Normal View History

2021-09-04 01:27:46 +05:30
# 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