[rspec-users] before_save model callback rspec testing

Csongor Bartus lists at ruby-forum.com
Fri Jun 20 11:12:02 EDT 2008

hi all,

i'm learning rspec and i can't figure out how to test if a callback is
executed in a model.

my model code is:

class User < ActiveRecord::Base
  before_save :encrypt_password


 def encrypt(password)
    self.class.encrypt(password, salt)

thanks a lot,
Posted via http://www.ruby-forum.com/.

More information about the rspec-users mailing list