excid3 / betterminitest.com

Learn how to write better Minitest tests
https://betterminitest.com
21 stars 1 forks source link

SUGGESTION: "Getting Started" Best Practices #17

Open GumptionWare opened 3 years ago

GumptionWare commented 3 years ago

IMHO, if this is BetterMinitest, we should include (probably several) "best practices" topics.

Since we are just starting out, I suggest a Start Strong (getting started best practices) set of recommendations, like:

  1. Recommended environment configuration (Guard, Minitest Reporters, etc.)

    • Minitest Reporters gem 'minitest-reporters'
    • Guard: gem 'guard' and gem 'guard-minitest'
    • Git configs for excluding whatever testing stuff we don't want to track
    • OTHERS?? - I need expert advice here <<=======
  2. Where to start? Avoiding the TDD or DDT debate, objective advice on how to get started writing tests which add the most value (but don't overwhelm) will be super valuable. Thoughts:

    • Follow the "Learn Enough..." (Michael Hartl) convention of trivial controller & model tests to ease into the habit?
    • Beyond that, best practices for maximizing the ROI of building tests
    • EXPERT ADVICE NEEDED HERE
  3. Example App - This may be just the way my brain works, but I have found that a real working app which evolves along with the material is a great way to make the concepts sink in.

  4. Additional recommendations welcome.

Although pretty noobish in the Rails world, I have been in software development for 30+ years. My rusty hands-on skills prevent me from defining the best practices in this domain, but I am happy to do the grunt work to create the content (and the sample app) guided by Rails experts here.