I would like to implement a method User.calculate_hashed_password
. I am trying to use the Shoulda testing library, which works with the built-in Rails testing tools, so the answer related to Test :: Unit will be as good as the one related to Shoulda (I think).
I'm trying to figure out what I need to check, and how , I have to test it. My initial idea is to do something like ...
class UserTest < ActiveSupport::TestCase
should 'Return a hashed password'
assert_not_nil User.calculate_hashed_password
end
end
Is this right to do?
Ethan source
share