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 12
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 19
def authenticate_or_request_with_http_basic(realm = "DefaultRealm")
  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 15
def authenticate_with_http_basic
  yield http_user, http_password
end
cookies() click to toggle source
# File lib/authlogic/test_case/mock_controller.rb, line 25
def cookies
  @cookies ||= MockCookieJar.new
end
http_auth_requested?() click to toggle source
# File lib/authlogic/test_case/mock_controller.rb, line 53
def http_auth_requested?
  @http_auth_requested ||= false
end
logger() click to toggle source
# File lib/authlogic/test_case/mock_controller.rb, line 33
def logger
  @logger ||= MockLogger.new
end
params() click to toggle source
# File lib/authlogic/test_case/mock_controller.rb, line 37
def params
  @params ||= {}
end
request() click to toggle source
# File lib/authlogic/test_case/mock_controller.rb, line 41
def request
  @request ||= MockRequest.new(controller)
end
request_content_type() click to toggle source
# File lib/authlogic/test_case/mock_controller.rb, line 45
def request_content_type
  @request_content_type ||= "text/html"
end
session() click to toggle source
# File lib/authlogic/test_case/mock_controller.rb, line 49
def session
  @session ||= {}
end