Can git bisect be used in auto-mode with rails?
The docs for git bisect shows how it can be used with the Linux kernel git bisect run make
For rails, this should be git bisect bundle exec rake spec. But how to know when there’s an error for bisect? Since RSpec is ultimately enveloped in Bundler?
rake will return with a non-zero exit code when it did not run successfully, and this is what git bisect will use to determine if there was a bug.
Now, if your tests didn’t catch the bug, then git bisect won’t help — because each time it runs, the rake will return clean.
So, you may want to write a test that is outside of source control to run against, and find when it first started to fail.