Image of Lucian Ghinda writing for notes.ghinda.com
August 6th, 2025

Running all tests from the current branch

I enjoy creating small automations using Ruby and Bash. While it might be simpler to use Bash, I like #Ruby so much that I want to use it more.

Here are two examples of how to run all the tests that have changed in the current branch: an example for Minitest and one for RSpec

You can, of course, modify this script to become an MCP, enabling tools like Claude Code or Cursor to run tests at the end of an implementation.

During multiple rounds of test runs and fixes, when focusing on each test individually LLMs may pass the most recent test they fixed but fail previous ones.