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