Welcome to mirror list, hosted at ThFree Co, Russian Federation.

be_one_of.rb « matchers « support « spec - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 16ee32b67c3816b721811d4e88076491e2de3a78 (plain)
1
2
3
4
5
6
7
8
9
10
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