Using Minitest::Spec in Rails? Watch out for the lifecycle hooks! - Remi Mercier - Freelance Software Developer
06-Mar-2026 277
A small mistake sent me on an overly long investigation into Minitest hooks, and how Rails integrates with these.After picking up Minitest to complement the QA process of one of my retainer clients, I’ve had confusing errors in our test suite for a while. We were moving fast to cover critical parts of the application, so we never had the time to investigate the flakiness thoroughly.
While preparing my upcoming talk – Lost in Minitest, the missing guide for Minitest tourists – I dug into how Ruby on Rails pulls in Minitest. And there I found the answers to my burning question: why on Earth does the following test fail?.
Using Minitest::Spec in Rails? Watch out for the lifecycle hooks! - Remi Mercier - Freelance Software Developer #ruby #rubydeveloper #rubyonrails #Using #Minitest::Spec #Rails? #Watch #lifecycle #hooks! #Mercier #Freelance #Software #Developer #developer #minitest::spec https://rubyonrails.ba/link/using-minitest-spec-in-rails-watch-out-for-the-lifecycle-hooks-remi-mercier-freelance-software-developer