class Authlogic::TestCase::MockController

Basically acts like a controller but doesn't do anything. Authlogic can interact with this, do it's thing and then you can look at the controller object to see if anything changed.

Attributes

http_password[RW]
http_user[RW]
realm[RW]
request_content_type[W]

Public Class Methods

new() click to toggle source
# File lib/authlogic/test_case/mock_controller.rb, line 9
def initialize
end

Public Instance Methods

authenticate_or_request_with_http_basic(realm = 'DefaultRealm') { |http_user, http_password| ... } click to toggle source
# File lib/authlogic/test_case/mock_controller.rb, line 16
def authenticate_or_request_with_http_basic(realm = 'DefaultRealm', &block)
  self.realm = realm
  @http_auth_requested = true
  yield http_user, http_password
end
authenticate_with_http_basic() { |http_user, http_password| ... } click to toggle source
# File lib/authlogic/test_case/mock_controller.rb, line 12
def authenticate_with_http_basic(&block)
  yield http_user, http_password
end
cookies() click to toggle source
# File lib/authlogic/test_case/mock_controller.rb, line 22
def cookies
  @cookies ||= MockCookieJar.new
end
http_auth_requested?() click to toggle source
# File lib/authlogic/test_case/mock_controller.rb, line 50
def http_auth_requested?
  @http_auth_requested ||= false
end
logger() click to toggle source
# File lib/authlogic/test_case/mock_controller.rb, line 30
def logger
  @logger ||= MockLogger.new
end
params() click to toggle source
# File lib/authlogic/test_case/mock_controller.rb, line 34
def params
  @params ||= {}
end
request() click to toggle source
# File lib/authlogic/test_case/mock_controller.rb, line 38
def request
  @request ||= MockRequest.new(controller)
end
request_content_type() click to toggle source
# File lib/authlogic/test_case/mock_controller.rb, line 42
def request_content_type
  @request_content_type ||= "text/html"
end
session() click to toggle source
# File lib/authlogic/test_case/mock_controller.rb, line 46
def session
  @session ||= {}
end