Module: Pundit::RSpec::Matchers
Overview
Namespace for Pundit’s RSpec matchers.
Class Attribute Summary collapse
-
.description(user, record) ⇒ Object
private
Used to retrieve a suitable description for the Pundit ‘permit` matcher.
Class Attribute Details
.description(user, record) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Used to retrieve a suitable description for the Pundit ‘permit` matcher.
29 30 31 32 33 |
# File 'lib/pundit/rspec.rb', line 29 def description(user, record) return @description.call(user, record) if defined?(@description) && @description.respond_to?(:call) @description end |