lib/operations/test_helpers.rb
# Works exactly the same way as {#precondition_errors} but
# for policies.
#
# @see #precondition_errors
Works exactly the same way as {#precondition_errors} but
for policies.
Works exactly the same way as { #precondition_errors } but for policies .
def policy_errors(policy, contract = Operations::TestHelpers.empty_contract, **context)
    component = Operations::Components::Policies.new(
      [policy],
      message_resolver: contract.message_resolver
    )
    result = component.call({}, context)
    result.errors.to_h
  end
def policy_errors ( policy , contract = Operations :: TestHelpers . empty_contract , ** context ) component = Operations :: Components :: Policies . new ( [ policy ] , message_resolver : contract . message_resolver ) result = component . call ( { } , context ) result . errors . to_h end
Works exactly the same way as {#precondition_errors} but
for policies.
Works exactly the same way as { #precondition_errors } but for policies .
policy
<not_specific>
contract
<not_specific>
empty_contract
<not_specific>
context
<not_specific>
see
None