Skip to content

Instantly share code, notes, and snippets.

@thomasfl
Created July 21, 2012 15:15
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save thomasfl/3156087 to your computer and use it in GitHub Desktop.
Autorun minitests fast
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