Created
October 24, 2011 06:01
-
-
Save databyte/1308446 to your computer and use it in GitHub Desktop.
Speed up AuthLogic for specs
This file contains 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
module SpecCryptoProvider | |
def self.encrypt(*tokens) | |
tokens.join("") | |
end | |
def self.matches?(crypted, *tokens) | |
encrypt(*tokens) == crypted | |
end | |
end | |
User.crypto_provider = SpecCryptoProvider | |
Guest.crypto_provider = SpecCryptoProvider |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment