Permalink
Browse files

Fixed up test location for r19 and rbx.

  • Loading branch information...
jimweirich committed May 15, 2009
1 parent 63d419d commit a66153af034e5b0680031dd693f764492a26845c
Showing with 13 additions and 11 deletions.
  1. +6 −4 Rakefile
  2. +3 −3 rakelib/rbx.rake
  3. +3 −3 rakelib/ruby19.rake
  4. +1 −1 test/functional/session_based_tests.rb
View
@@ -62,7 +62,8 @@ task :tu => :test_units
task :tc => :test_contribs
task :test => :test_units
-Rake::TestTask.new(:test_all) do |t|
+namespace :test do
+ Rake::TestTask.new(:all) do |t|
t.test_files = FileList[
'test/lib/*_test.rb',
'test/contrib/*_test.rb',
@@ -72,23 +73,24 @@ Rake::TestTask.new(:test_all) do |t|
t.verbose = false
end
-Rake::TestTask.new(:test_units) do |t|
+Rake::TestTask.new(:units) do |t|
t.test_files = FileList['test/lib/*_test.rb']
t.warning = true
t.verbose = false
end
-Rake::TestTask.new(:test_functional) do |t|
+Rake::TestTask.new(:functional) do |t|
t.test_files = FileList['test/functional/*_test.rb']
t.warning = true
t.verbose = false
end
-Rake::TestTask.new(:test_contribs) do |t|
+Rake::TestTask.new(:contribs) do |t|
t.test_files = FileList['test/contrib/test*.rb']
t.warning = true
t.verbose = false
end
+end
begin
require 'rcov/rcovtask'
View
@@ -63,19 +63,19 @@ namespace "rbx" do
desc "Run the unit tests in Ruby 1.9"
task :units, :opts, :needs => [:env19] do |t, args|
- test_files = FileList['test/**/test_*.rb']
+ test_files = FileList['test/lib/*_test.rb']
Rbx.run_tests(test_files, args.opts)
end
desc "Run the functional tests in Ruby 1.9"
task :functionals, :opts, :needs => [:env19] do |t, args|
- test_files = FileList['test/functional.rb']
+ test_files = FileList['test/functional/*_test.rb']
Rbx.run_tests(test_files, args.opts)
end
desc "Run the all the tests in Ruby 1.9"
task :all, :opts, :needs => [:env19] do |t, args|
- test_files = FileList['test/functional.rb', 'test/**/test_*.rb']
+ test_files = FileList['test/functional/*_test.rb', 'test/lib/*_test.rb']
Rbx.run_tests(test_files, args.opts)
end
end
View
@@ -69,19 +69,19 @@ namespace "ruby19" do
desc "Run the unit tests in Ruby 1.9"
task :units, :opts, :needs => [:env19] do |t, args|
- test_files = FileList['test/**/test_*.rb']
+ test_files = FileList['test/lib/*_test.rb']
Ruby19.run_tests(test_files, args.opts)
end
desc "Run the functional tests in Ruby 1.9"
task :functionals, :opts, :needs => [:env19] do |t, args|
- test_files = FileList['test/functional.rb']
+ test_files = FileList['test/functional/*_test.rb']
Ruby19.run_tests(test_files, args.opts)
end
desc "Run the all the tests in Ruby 1.9"
task :all, :opts, :needs => [:env19] do |t, args|
- test_files = FileList['test/functional.rb', 'test/**/test_*.rb']
+ test_files = FileList['test/functional/*_test.rb', 'test/lib/*_test.rb']
Ruby19.run_tests(test_files, args.opts)
end
end
@@ -321,7 +321,7 @@ def test_comment_before_desc_is_ignored
def test_correct_number_of_tasks_reported
Dir.chdir("test/data/comments") { rake("-T")}
- assert_equal(3, @out.grep(/t\d/).size)
+ assert_equal(3, @out.split(/\n/).grep(/t\d/).size)
end
private

0 comments on commit a66153a

Please sign in to comment.