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 10 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 17 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 13 def authenticate_with_http_basic yield http_user, http_password end
http_auth_requested?()
click to toggle source
# File lib/authlogic/test_case/mock_controller.rb, line 51 def http_auth_requested? @http_auth_requested ||= false end
logger()
click to toggle source
# File lib/authlogic/test_case/mock_controller.rb, line 31 def logger @logger ||= MockLogger.new end
params()
click to toggle source
# File lib/authlogic/test_case/mock_controller.rb, line 35 def params @params ||= {} end
request()
click to toggle source
# File lib/authlogic/test_case/mock_controller.rb, line 39 def request @request ||= MockRequest.new(controller) end
request_content_type()
click to toggle source
# File lib/authlogic/test_case/mock_controller.rb, line 43 def request_content_type @request_content_type ||= "text/html" end
session()
click to toggle source
# File lib/authlogic/test_case/mock_controller.rb, line 47 def session @session ||= {} end