Sha256: 83c96744ed3eb12b15822b44ed6c7409317cfbf5ba030c201c04490f0b1ecc1a
Contents?: true
Size: 402 Bytes
Versions: 16
Compression:
Stored size: 402 Bytes
Contents
RSpec::Matchers.define :permit do |action| match do |policy| policy.public_send("#{action}?") end failure_message_for_should do |policy| "#{policy.class} does not permit #{action} on #{policy.record} for #{policy.user.inspect}." end failure_message_for_should_not do |policy| "#{policy.class} does not forbid #{action} on #{policy.record} for #{policy.user.inspect}." end end
Version data entries
16 entries across 16 versions & 1 rubygems