1
0
Fork 0
mirror of https://github.com/heartcombo/devise.git synced 2022-11-09 12:18:31 -05:00

Merge pull request #1099 from paulbellamy/master

Changing references to SecureRandom in generators and encryptable_test
This commit is contained in:
José Valim 2011-05-28 07:52:09 -07:00
commit 97659a1193
3 changed files with 4 additions and 4 deletions

View file

@ -1,4 +1,4 @@
require 'active_support/secure_random'
require 'securerandom'
module Devise
module Generators
@ -21,4 +21,4 @@ module Devise
end
end
end
end
end

View file

@ -54,7 +54,7 @@ Devise.setup do |config|
config.stretches = 10
# Setup a pepper to generate the encrypted password.
# config.pepper = <%= ActiveSupport::SecureRandom.hex(64).inspect %>
# config.pepper = <%= SecureRandom.hex(64).inspect %>
# ==> Configuration for :confirmable
# The time you want to give your user to confirm his account. During this time

View file

@ -31,7 +31,7 @@ class EncryptableTest < ActiveSupport::TestCase
test 'should generate a base64 hash using SecureRandom for password salt' do
swap_with_encryptor Admin, :sha1 do
ActiveSupport::SecureRandom.expects(:base64).with(15).returns('friendly_token')
SecureRandom.expects(:base64).with(15).returns('friendly_token')
assert_equal 'friendly_token', create_admin.password_salt
end
end