spec/seraph/password_encryptor_spec.rb in seraph-0.0.4 vs spec/seraph/password_encryptor_spec.rb in seraph-0.0.5

- old
+ new

@@ -11,15 +11,10 @@ it 'encrypts the password using BCrypt' do expect(encrypted_password).to eq BCrypt::Engine.hash_secret(password, salt) end context 'when pepper is set' do - let(:pepper) { '9b8177d1d835fad6cc19b455d41ec64f6dcbe83a1af60eb598973f8fb6e29fb1' } - before do - Seraph.configure do |config| - config.pepper = pepper - end - end + include_context 'pepper set in configuration' it 'uses the pepper for encrypting the password' do expect(encrypted_password).to eq BCrypt::Engine.hash_secret("#{password}:#{pepper}", salt) end end