runs tests against a git repo until they pass, finding the point in time when they broke
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


A new bug is discovered by a customer, but you have no idea when it was introduced into the codebase. Wouldn't it be cool to be able to write a test and see when the bug was first introduced?

RubySuperBlame takes your failing test and steps back through git commits until your test is passing. It then tells you the commit that broke it and the diff of the changes. Now you have cause and effect and should be able to fix it more easily!

Currently supports git and rspec. Very proof of concept, very pre-ALPHA, be CAREFUL!


Not intended to be bundled with an app, just install it:

$ gem install ruby_super_blame


In the directory of your ruby codebase, create an encapsulated test in a gitignored directory. It'd be a good idea to make sure you're on master and have no pending changes.

$ git checkout master
$ ruby_super_blame run -t tmp/fib_temp_spec.rb

It will quickly spin through commits until it finds the one which first broke that test. Then it spits out:

Initially broken on commit: cd46921fefefa5163846c46ca5b863fb091dcf30, by some of these changes:
diff --git a/fibonacci.rb b/fibonacci.rb
index 4260e15..15fb306 100644
--- a/fibonacci.rb
+++ b/fibonacci.rb
@@ -3,7 +3,7 @@
 class Fibonacci
    def fib(n)
        if n == 0
-           return 0
+           return 10
        elsif n == 1
            return 1

Showing when I intentionally broke my fibonacci function.


Normally in a spec I'd write:

require './fibonacci'

But this causes a caching issue where even though your files are changing from the git checkouts, they are not seen by the test. For now, you can instead write:

load './fibonacci.rb'

I'll find a systematic way around this, but for now it's necessary.


  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request