debian-mirror-gitlab/spec/support/matchers/be_one_of.rb
2021-09-04 01:27:46 +05:30

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