Created

Embed URL

HTTPS clone URL

SSH clone URL

You can clone with HTTPS or SSH.

Download Gist

Autorun minitests fast

View minitest_autorun.rb
1 2 3 4 5 6 7 8 9 10 11 12
require 'rubygems'
require 'filewatcher'
 
# Autorun minitests when one of these files is updated:
files = ["my_minitest_tests.rb","code_under_test.rb"]
 
puts "Update one of these files to start tests: " + files.join(", ")
FileWatcher.new(files).watch do |filename|
puts "Updated " + filename
load filename
MiniTest::Unit.new.run
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.