From 705c35d078baaccb4306b6708aa56558a1e1d6fe Mon Sep 17 00:00:00 2001 From: Alexey Verkhovsky Date: Mon, 9 May 2005 06:09:21 +0000 Subject: [PATCH] Removed unneeded :recent task from rakefile.rb. Instiki unit tests are fast. --- rakefile.rb | 23 ----------------------- 1 file changed, 23 deletions(-) diff --git a/rakefile.rb b/rakefile.rb index c45812db..9f8796a4 100755 --- a/rakefile.rb +++ b/rakefile.rb @@ -5,7 +5,6 @@ require 'rake/rdoctask' require 'rake/packagetask' $VERBOSE = nil -TEST_CHANGES_SINCE = Time.now - 600 # Standard Rails tasks @@ -22,28 +21,6 @@ end desc 'Generate API documentatio, show coding stats' task :doc => [ :appdoc, :stats ] -# Look up tests for recently modified sources. -def recent_tests(source_pattern, test_path, touched_since = 10.minutes.ago) - FileList[source_pattern].map do |path| - if File.mtime(path) > touched_since - test = "#{test_path}/#{File.basename(path, '.rb')}_test.rb" - test if File.exists?(test) - end - end.compact -end - -desc 'Test recent changes.' -Rake::TestTask.new(:recent) do |t| - since = TEST_CHANGES_SINCE - touched = FileList['test/**/*_test.rb'].select { |path| File.mtime(path) > since } + - recent_tests('app/models/*.rb', 'test/unit', since) + - recent_tests('app/controllers/*.rb', 'test/functional', since) - - t.libs << 'test' - t.verbose = true - t.test_files = touched.uniq -end - desc 'Run the unit tests in test/unit' Rake::TestTask.new('test_units') { |t| t.libs << 'test'