Using and Testing ActiveRecord/Rails Observers | upstream agile - software
june 2009 by phorsfall
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
Using mocha it would be something like this to disable all notifications to the User model:
User.any_instance.stubs(:notify)
june 2009 by phorsfall
The Lie -- techno weenie
february 2009 by phorsfall
When I see code that stubs find or save, I cringe.
ruby
rails
fixtures
rspec
stubbing
testing
article
february 2009 by phorsfall
eigenclass - rcov: code coverage for Ruby
november 2007 by phorsfall
sudo gem install rcov
ruby
testing
coverage
tdd
tools
rails
rcov
november 2007 by phorsfall
related tags
activerecord ⊕ agile ⊕ article ⊕ autotest ⊕ bdd ⊕ book ⊕ browser ⊕ builder ⊕ coverage ⊕ discussion ⊕ factory ⊕ fast_context ⊕ fixtures ⊕ framework ⊕ gem ⊕ hydra ⊕ javascript ⊕ jruby ⊕ mock ⊕ mocking ⊕ model_stubbing ⊕ node.js ⊕ observers ⊕ pagination ⊕ pattern ⊕ performance ⊕ plugins ⊕ pratik ⊕ presentation ⊕ profiling ⊕ projectmanagement ⊕ rails ⊕ railsenvy ⊕ rake ⊕ rcov ⊕ ree ⊕ rspec ⊕ ruby ⊕ scalability ⊕ screencast ⊕ selenium ⊕ shoulda ⊕ softwareengineering ⊕ stories ⊕ stubbing ⊕ tdd ⊕ testing ⊖ testunit ⊕ textmate ⊕ tools ⊕ ui ⊕ usability ⊕ video ⊕ web ⊕ webdesign ⊕ webrat ⊕Copy this bookmark: