#-*- ruby -*- # For more doc, see http://docs.seattlerb.org/ZenTest/Autotest.html require 'autotest/restart' Autotest.add_hook :initialize do |at| at.clear_mappings # hardcoded lib and tests path at.libs = '.:lib:tests/spec' # test lib being tested against at.testlib = 'tests/spec/minitest_helper' at.order = :random # matches lib/test_here.rb => tests/spec/test_here.rb at.add_mapping(%r%^lib/(.*)\.rb$%) { |_, m| ["tests/spec/#{m[1]}_spec.rb"] } end