diff options
Diffstat (limited to 'rake_tasks')
-rw-r--r-- | rake_tasks/documentation.rake | 8 | ||||
-rw-r--r-- | rake_tasks/test.rake | 10 |
2 files changed, 14 insertions, 4 deletions
diff --git a/rake_tasks/documentation.rake b/rake_tasks/documentation.rake index 16142fd..796e281 100644 --- a/rake_tasks/documentation.rake +++ b/rake_tasks/documentation.rake @@ -1,5 +1,9 @@ -gem 'rdoc' if defined? gem
-require 'rdoc/task'
+if RUBY_VERSION >= '1.8.7'
+ gem 'rdoc' if defined? gem
+ require 'rdoc/task'
+else
+ require 'rake/rdoctask'
+end
desc 'Generate documentation for CodeRay'
Rake::RDocTask.new :doc do |rd|
diff --git a/rake_tasks/test.rake b/rake_tasks/test.rake index 203bbf6..1140062 100644 --- a/rake_tasks/test.rake +++ b/rake_tasks/test.rake @@ -52,10 +52,16 @@ namespace :test do desc 'test the CodeRay executable' task :exe do - ruby './test/executable/suite.rb' + if RUBY_VERSION >= '1.8.7' + ruby './test/executable/suite.rb' + else + puts + puts "Can't run executable tests because shoulda-context requires Ruby 1.8.7+." + puts "Skipping." + end end end -task :test => %w( test:functional test:exe test:units ) +task :test => %w(test:functional test:units test:exe) task :samples => 'test:samples'
\ No newline at end of file |