ruby on rails 3 - How do I skip a observer after_save call while testing in Rspec? -



ruby on rails 3 - How do I skip a observer after_save call while testing in Rspec? -

there api calls external services in after_save method in postobserver. don't want invoke after_save while testing rspec. there way that? give thanks you.

it's rails 3.1

stub out:

postobserver.instance.stub(:after_save => true)

ruby-on-rails-3 rspec observer-pattern

Comments

Popular posts from this blog

How do I check if an insert was successful with MySQLdb in Python? -

delphi - blogger via idHTTP : error 400 bad request -

postgresql - ERROR: operator is not unique: unknown + unknown -