Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Change banner explaining how to specify AR version

  • Loading branch information...
commit a40e335561407cefcd885b501a381ba2d688f7dd 1 parent 44ca26c
@nicksieger nicksieger authored
Showing with 15 additions and 2 deletions.
  1. +15 −1 rakelib/test.rake
  2. +0 −1  test/jdbc_common.rb
View
16 rakelib/test.rake
@@ -17,9 +17,23 @@ def set_compat_version(task)
end
end
+def all_appraisal_names
+ @names ||= begin
+ names = []
+ Appraisal::File.each {|a| names << a.name }
+ names
+ end
+end
+
def declare_test_task_for(adapter, options = {})
driver = options[:driver] || adapter
- Rake::TestTask.new("test_#{adapter}" => (options[:prereqs] || [])) do |t|
+ prereqs = options[:prereqs] || []
+ prereqs = [prereqs].flatten
+ task "test_#{adapter}_pre" do
+ puts "Specify AR version with 'rake appraisal:{version} test_#{adapter}' where version=(#{all_appraisal_names.join('|')})"
+ end
+ prereqs << "test_#{adapter}_pre"
+ Rake::TestTask.new("test_#{adapter}" => prereqs) do |t|
files = FileList["test/#{adapter}*test.rb"]
if adapter == "derby"
files << 'test/activerecord/connection_adapters/type_conversion_test.rb'
View
1  test/jdbc_common.rb
@@ -5,7 +5,6 @@ def jruby?
require 'arjdbc' if jruby?
puts "Using activerecord version #{ActiveRecord::VERSION::STRING}"
-puts "Specify version with 'rake appraisal:{version} default'. See 'rake -T'."
require 'models/auto_id'
require 'models/entry'
require 'models/data_types'
Please sign in to comment.
Something went wrong with that request. Please try again.