Log in Sign up
1 Matching Annotations
  1. Sep 2024
  2. stackoverflow.com stackoverflow.com
    Rails Observers - When to and when not to use observers in Rails
    1
    1. TylerRick 16 Sep 2024
      in Public
      Disable all observers in your test suite by default. They should not be complicating your model tests because they should have separate concerns anyway. You don't need to unit test that observers actually fire, because ActiveRecord's test suite does that, and your integration tests will cover it.
      good policy/practice/procedure observer pattern separation of concerns testing: avoid over-testing: don't test the same thing in many different tests testing: only test the thing you're trying to test
    Visit annotations in context

    Tags

    • separation of concerns
    • good policy/practice/procedure
    • observer pattern
    • testing: only test the thing you're trying to test
    • testing: avoid over-testing: don't test the same thing in many different tests

    Annotators

    • TylerRick

    URL

    stackoverflow.com/questions/4866509/rails-observers-when-to-and-when-not-to-use-observers-in-rails
Share:
Group. Only group members will be able to view this annotation.
Only me. No one else will be able to view this annotation.
Hypothes.is
  • About
  • Blog
  • Bioscience
  • Education
  • Jobs
  • Help
  • Contact
  • Terms of Service
  • Privacy Policy