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

11 lines
219 B
Ruby
Raw Normal View History

2023-03-17 16:20:25 +05:30
# frozen_string_literal: true
# Assert that this value is a boolean, i.e. true or false
#
# ```
# expect(value).to be_boolean
# ```
RSpec::Matchers.define :be_boolean do
match { |value| value.in? [true, false] }
end