Skip to content

Instantly share code, notes, and snippets.

@kaievns
Created December 6, 2011 17:27
Show Gist options
  • Save kaievns/1439065 to your computer and use it in GitHub Desktop.
Save kaievns/1439065 to your computer and use it in GitHub Desktop.
RSpec speed up for BCrypt
#
# 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