Module: Allowy::ControllerAuthorizationMacros
- Extended by:
- ActiveSupport::Concern
- Defined in:
- lib/allowy/rspec.rb
Defined Under Namespace
Modules: ClassMethods
Instance Method Summary collapse
Instance Method Details
#allowy ⇒ Object
9 10 11 |
# File 'lib/allowy/rspec.rb', line 9 def allowy @controller.current_allowy end |
#should_authorize_for(*args) ⇒ Object
14 15 16 |
# File 'lib/allowy/rspec.rb', line 14 def (*args) expect(allowy).to receive(:authorize!).with(*args) end |
#should_not_authorize_for(*args) ⇒ Object
18 19 20 |
# File 'lib/allowy/rspec.rb', line 18 def (*args) expect(allowy).not_to receive(:authorize!).with(*args) end |