summaryrefslogtreecommitdiff
path: root/rake_tasks
diff options
context:
space:
mode:
authorNathan Youngman <git@nathany.com>2012-10-28 14:50:58 -0600
committerNathan Youngman <git@nathany.com>2012-10-28 14:50:58 -0600
commit93937e0b3004710f172b000d5381b3a113453c65 (patch)
tree7324b5bec5f0578ba1f5937602dc94b8c6585b19 /rake_tasks
parent3effca8291ed4941f7b3a1c2088b50274f28aa6f (diff)
downloadcoderay-93937e0b3004710f172b000d5381b3a113453c65.tar.gz
use github for coderay-test-scanners
Diffstat (limited to 'rake_tasks')
-rw-r--r--rake_tasks/test.rake30
1 files changed, 16 insertions, 14 deletions
diff --git a/rake_tasks/test.rake b/rake_tasks/test.rake
index f070ccc..bf01c63 100644
--- a/rake_tasks/test.rake
+++ b/rake_tasks/test.rake
@@ -1,40 +1,42 @@
namespace :test do
-
+
desc 'run all sample tests'
task :samples do
ruby './sample/suite.rb'
end
-
+
desc 'run functional tests'
task :functional do
ruby './test/functional/suite.rb'
ruby './test/functional/for_redcloth.rb'
end
-
+
desc 'run unit tests'
task :units do
ruby './test/unit/suite.rb'
end
-
+
scanner_suite = 'test/scanners/suite.rb'
task scanner_suite do
unless File.exist? scanner_suite
- puts 'Scanner tests not found; downloading from Subversion...'
- sh 'svn co http://svn.rubychan.de/coderay-scanner-tests/trunk/ test/scanners/'
+ puts 'Scanner tests not found; downloading from GitHub...'
+ sh 'git clone https://github.com/rubychan/coderay-scanner-tests.git test/scanners/'
puts 'Finished.'
end
end
-
+
desc 'run all scanner tests'
task :scanners => :update_scanner_suite do
ruby scanner_suite
end
-
- desc 'update scanner test suite from SVN'
+
+ desc 'update scanner test suite from GitHub'
task :update_scanner_suite => scanner_suite do
- sh "svn up #{File.dirname(scanner_suite)}"
+ Dir.chdir(File.dirname(scanner_suite)) do
+ sh "git pull"
+ end
end
-
+
namespace :scanner do
Dir['./test/scanners/*'].each do |scanner|
next unless File.directory? scanner
@@ -45,7 +47,7 @@ namespace :test do
end
end
end
-
+
desc 'clean test output files'
task :clean do
for file in Dir['test/scanners/**/*.actual.*']
@@ -61,7 +63,7 @@ namespace :test do
rm file
end
end
-
+
desc 'test the CodeRay executable'
task :exe do
if RUBY_VERSION >= '1.8.7'
@@ -72,7 +74,7 @@ namespace :test do
puts "Skipping."
end
end
-
+
end
task :test => %w(test:functional test:units test:exe)