Created
June 1, 2012 09:25
-
-
Save AJFaraday/2850705 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# auth controller | |
def login | |
... | |
rescue Exception=> ex | |
logger.error ex.message | |
logger.info ex.backtrace.join("\n") | |
clear_session | |
flash[:warning] = "Incorrect login or password." | |
# in coverage and debugger, this line is not being called!?! | |
render :action => 'login', :layout=> 'simple' | |
end | |
# auth controller testst | |
def test_login_exception | |
assert_raise(NoMethodError){@controller.send(:login)} | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment