Sha256: e732b6c9227f02490b4f90690abfdd2e6596e14152e1cf2012f8617106777f40
Contents?: true
Size: 658 Bytes
Versions: 7
Compression:
Stored size: 658 Bytes
Contents
# frozen_string_literal: true require_relative 'utils/policy_info' module Pundit module Matchers # This is the base class for all matchers in the Pundit Matchers library. class BaseMatcher # Error message when an ambiguous negated matcher is used. AMBIGUOUS_NEGATED_MATCHER_ERROR = <<~MSG `expect().not_to %<name>s` is not supported since it creates ambiguity. MSG private attr_reader :policy_info def setup_policy_info!(policy) @policy_info = Pundit::Matchers::Utils::PolicyInfo.new(policy) end def user_message " for '#{policy_info.user}'" end end end end
Version data entries
7 entries across 7 versions & 1 rubygems