Permalink
Browse files

Changed test tasks back to using the rake provided task macros.

Renamed some tasks and added abbreviations.


git-svn-id: svn+ssh://rubyforge.org/var/svn/rake/trunk@234 5af023f1-ac1a-0410-98d6-829a145c37ef
  • Loading branch information...
1 parent 4e6e051 commit 9b9204a740addc67e50d3dc1ca50947db8ad5b41 jimweirich committed Jul 11, 2004
Showing with 20 additions and 14 deletions.
  1. +20 −14 rake/Rakefile
View
@@ -34,30 +34,36 @@ SRC_RB = FileList['lib/**/*.rb']
desc "Default Task"
task :default => :test
-# Define a test task.
+# Test Tasks ---------------------------------------------------------
-desc "Run the unit tests"
-task :test do
- ruby %{-Ilib:test -e 'Dir["test/test*.rb"].each { |f| load f; puts f }' }
+Rake::TestTask.new do |t|
+ t.pattern = 'test/test*.rb'
+ t.verbose = true
end
-desc "Run the Functional Tests"
-task :test_fun do
- ruby %{-Ilib:test -e 'Dir["test/fun*.rb"].each { |f| load f; puts f }' }
+Rake::TestTask.new(:testfun) do |t|
+ t.pattern = 'test/fun*.rb'
+ t.verbose = true
+end
+
+Rake::TestTask.new(:testcontrib) do |t|
+ t.pattern = 'test/contrib/test*.rb'
+ t.verbose = true
end
directory 'testdata'
task :test => ['testdata']
-Rake::TestTask.new(:test_contrib) { |ctest|
- ctest.pattern = 'test/contrib/test*.rb'
- ctest.verbose = true
-}
+desc "Run all test targets"
+task :testall => [:test, :testcontrib, :testfun]
-# Define a test that will run all the test targets.
+# Abbreviations
-desc "Run all test targets"
-task :testall => [:test, :test_contrib, :test_fun]
+task :ta => [:testall]
+task :tf => [:testfun]
+task :tc => [:testcontrib]
+
+# CVS Tasks ----------------------------------------------------------
desc "Tag all the CVS files with the latest release number (TAG=x)"
task :tag do

0 comments on commit 9b9204a

Please sign in to comment.