Displaying 1 result from an estimated 1 matches for "tttttt".
Did you mean:
ttttt
2007 Nov 14
4
Stubbing out required associated models
...tself needs to be valid(validates_presence_of and
validates_associated).
When I wrote the specs, I wrote helpers for the attributes instead of
fixtures, like so:
module UserSpecHelper
def valid_user_attributes
{
:email => "test at here.com",
:password => "tttttt",
:password_confirmation => "tttttt"
}
end
end
If the model had a required associated model, I''d also add some valid
attribute helpers to make the associated model pass as well:
module UserSpecHelper
def valid_user_attributes
{
:email =>...