debian-mirror-gitlab/spec/support/matchers/be_boolean.rb
2023-03-17 16:20:25 +05:30

10 lines
219 B
Ruby

# 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