How to test ActiveRecord callbacks with RSpec?

Posted by FoxDemon on Stack Overflow See other posts from Stack Overflow or by FoxDemon
Published on 2010-04-20T08:01:11Z Indexed on 2010/04/20 17:33 UTC
Read the original article Hit count: 191

How to test the following example?

class Post < ActiveRecord::Base
  belongs_to :discussion  

  def after_save   # or after_create
    discussion.touch
  end
end

© Stack Overflow or respective owner

Related posts about rspec

Related posts about activerecord