lib/pundit/matchers/utils/policy_info.rb in pundit-matchers-2.1.0 vs lib/pundit/matchers/utils/policy_info.rb in pundit-matchers-2.2.0

- old
+ new

@@ -12,10 +12,10 @@ end def actions @actions ||= begin policy_methods = @policy.public_methods - Object.instance_methods - policy_methods.grep(/\?$/).map { |policy_method| policy_method.to_s.sub(/\?$/, '').to_sym } + policy_methods.grep(/\?$/).sort.map { |policy_method| policy_method.to_s.delete_suffix('?').to_sym } end end def permitted_actions @permitted_actions ||= actions.select { |action| policy.public_send("#{action}?") }