Module: Allowy::ControllerAuthorizationMacros::ClassMethods

Defined in:
lib/allowy/rspec.rb

Instance Method Summary collapse

Instance Method Details

#ignore_authorization!Object



23
24
25
26
27
28
29
# File 'lib/allowy/rspec.rb', line 23

def ignore_authorization!
  before(:each) do
    registry = double 'Registry'
    allow(registry).to receive_messages(:can? => true, :cannot? => false, :authorize! => nil, access_control_for!: registry)
    allow(@controller).to receive(:current_allowy).and_return registry
  end
end