Sha256: a0d6be579bcd4331967d53c3ebda1827210c9b0997089fcfb76dde9ed43b1538
Contents?: true
Size: 436 Bytes
Versions: 9
Compression:
Stored size: 436 Bytes
Contents
# frozen_string_literal: true RSpec::Matchers.define :permit do |action| match do |policy| policy.public_send("#{action}?") end failure_message do |policy| "#{policy.class} does not permit #{action} on #{policy.record} "\ "for #{policy.user.inspect}." end failure_message_when_negated do |policy| "#{policy.class} does not forbid #{action} on #{policy.record} "\ "for #{policy.user.inspect}." end end
Version data entries
9 entries across 9 versions & 1 rubygems