Skip to content

Instantly share code, notes, and snippets.

@unsay
Last active December 17, 2015 08:09
Show Gist options
  • Save unsay/5578048 to your computer and use it in GitHub Desktop.
Save unsay/5578048 to your computer and use it in GitHub Desktop.
Use minimal bcrypt cost for faster specs.
# Use minimal bcrypt cost for faster specs.
# 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