Module: Suhyo::ControllerMatchers

Defined in:
lib/suhyo/controller_matchers.rb

Defined Under Namespace

Classes: DenyAccess

Instance Method Summary collapse

Instance Method Details

#deny_accessObject

Looks for either of two things:

  1. HTTP status code 403 Forbidden

  2. Redirect to a certain access denied URL.

The access denied URL is determined by Suhyo.config.access_denied_url, which defaults to http://test.host/login.

Usage:

get :some_restricted_action
response.should deny_access


34
35
36
# File 'lib/suhyo/controller_matchers.rb', line 34

def deny_access
	DenyAccess.new
end