phorsfall + testing   40

Using and Testing ActiveRecord/Rails Observers | upstream agile - software
You can disable the observers by stubbing the notify event in the model.
Using mocha it would be something like this to disable all notifications to the User model:

User.any_instance.stubs(:notify)
ruby  rails  testing  observers  tdd 
june 2009 by phorsfall
The Lie -- techno weenie
When I see code that stubs find or save, I cringe.
ruby  rails  fixtures  rspec  stubbing  testing  article 
february 2009 by phorsfall

Copy this bookmark:



description:


tags: