I'd like to test models working with each other. Something like this:
query = Query.new
user = users(:first)
assert_equal Query::STATUSES[:new], query.status
query.resend_to user.id
asser_equal Query::STATUSES[:resent], query.status
asser_equal 1, user.queries.size
But I even dont know, what is the right name for such kind of testing, scenario driven testing, behaviour driven testing?
Please, tell me how it's called and some examples.
Aucun commentaire:
Enregistrer un commentaire