How to test the following example?
class Post < ActiveRecord::Base
belongs_to :discussion
def after_save # or after_create
discussion.touch
end
end
EDIT: I have found a nicer way to write the code above.
class Post < ActiveRecord::Base
belongs_to :discussion, :touch => true
end