Skip to content

Instantly share code, notes, and snippets.

@biscuitvile
Created October 20, 2014 13:24
Show Gist options
  • Select an option

  • Save biscuitvile/c93eb90fcf69ccaeef42 to your computer and use it in GitHub Desktop.

Select an option

Save biscuitvile/c93eb90fcf69ccaeef42 to your computer and use it in GitHub Desktop.
it "encrypts a password before save when a password is set" do
account.password = 'password'
mock(PasswordEncryptor).new(account) do
mock!.assign_encrypted_password(account.subdomain).subject
end
account.save
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment