public
Created

Autorun minitests fast

  • Download Gist
minitest_autorun.rb
Ruby
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

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.