gitlab-org--gitlab-foss/spec/support/helpers/policy_helpers.rb
Rémy Coutable ce4b70ce18
Factorize policy helpers into PolicyHelpers
Signed-off-by: Rémy Coutable <remy@rymai.me>
2019-03-27 15:41:46 +01:00

11 lines
262 B
Ruby

# frozen_string_literal: true
module PolicyHelpers
def expect_allowed(*permissions)
permissions.each { |p| is_expected.to be_allowed(p) }
end
def expect_disallowed(*permissions)
permissions.each { |p| is_expected.not_to be_allowed(p) }
end
end