Created
December 6, 2011 17:27
-
-
Save kaievns/1439065 to your computer and use it in GitHub Desktop.
RSpec speed up for BCrypt
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
# | |
# Making BCrypt to use minimal cost so that the specs run faster | |
# | |
# place this in the spec/support/bcrypt.rb file | |
# | |
require 'bcrypt' | |
module BCrypt | |
class Engine | |
class << self | |
alias :_generate_salt :generate_salt | |
def generate_salt(cost = MIN_COST) | |
_generate_salt(MIN_COST) | |
end | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment