Skip to content

Instantly share code, notes, and snippets.

@thomasfl
Created August 19, 2012 14:40
Show Gist options
  • Select an option

  • Save thomasfl/3395169 to your computer and use it in GitHub Desktop.

Select an option

Save thomasfl/3395169 to your computer and use it in GitHub Desktop.
require 'rubygems'
require 'filewatcher'
filenames = ["/Users/thomasf/ruby/roman_numerals_test.rb"]
FileWatcher.new(filenames).watch(0.5) do |filename|
print "\e[2J\e[f"
puts "Reloading #{filename}"
load(filename)
MiniTest::Unit.new.run_tests
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment