module Allowy::ControllerAuthorizationMacros

Public Instance Methods

allowy() click to toggle source
# File lib/allowy/rspec.rb, line 9
def allowy
  @controller.current_allowy
end
should_authorize_for(*args) click to toggle source
# File lib/allowy/rspec.rb, line 14
def should_authorize_for(*args)
  expect(allowy).to receive(:authorize!).with(*args)
end
should_not_authorize_for(*args) click to toggle source
# File lib/allowy/rspec.rb, line 18
def should_not_authorize_for(*args)
  expect(allowy).not_to receive(:authorize!).with(*args)
end