Sha256: 6b929af8b58df4060b474e269766f68b98161b7278ad5ddc2c09ee38c5a7d317
Contents?: true
Size: 660 Bytes
Versions: 8
Compression:
Stored size: 660 Bytes
Contents
# A simple alternative to autotest that isnt as painful options = { :options => "--require '#{File.expand_path(File.dirname(__FILE__)) + "/spec_helper"}' --format nested --color", :binary => "spec" } watch("(lib|spec)/(.*)\.rb") do |match| puts %x[ clear ] file = match[match.size - 1] opts = options[:options] binary = options[:binary] files = [] ["spec/lib/*.rb", "spec/lib/*/*.rb"].each do |glob| Dir.glob(glob).each { |f| files << f } end puts "Found:" files.each { |f| puts "+ #{f}" } puts "" command = "#{binary} #{files.collect! { |f| File.expand_path(f) }.join(" ")} #{opts}" system(command) end
Version data entries
8 entries across 8 versions & 1 rubygems