Module: Pundit::RSpec::DSL
- Defined in:
- lib/pundit/rspec.rb
Overview
Mixed in to all policy example groups to provide a DSL.
Instance Method Summary collapse
Instance Method Details
#permissions(*list, &block) ⇒ void
This method returns an undefined value.
131 132 133 134 135 136 137 138 139 140 141 |
# File 'lib/pundit/rspec.rb', line 131 def (*list, &block) = { permissions: list, caller: caller } if list.last == :focus list.pop [:focus] = true end description = list.to_sentence describe(description, ) { instance_eval(&block) } end |