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