Skip to content

Commit

Permalink
Use gem locking instead of environment hacks to test various versions.
Browse files Browse the repository at this point in the history
  • Loading branch information
mperham committed Feb 8, 2009
1 parent 46be428 commit 1984eee
Showing 1 changed file with 7 additions and 17 deletions.
24 changes: 7 additions & 17 deletions test/deadlock_retry_test.rb
@@ -1,20 +1,10 @@
begin
require 'active_record'
rescue LoadError
if ENV['ACTIVERECORD_PATH'].nil?
abort <<MSG
Please set the ACTIVERECORD_PATH environment variable to the directory
containing the active_record.rb file.
MSG
else
$LOAD_PATH.unshift << ENV['ACTIVERECORD_PATH']
begin
require 'active_record'
rescue LoadError
abort "ActiveRecord could not be found."
end
end
end
require 'rubygems'

# Change the version if you want to test a different version of ActiveRecord
gem 'activerecord', '2.1.1'
require 'active_record'
require 'active_record/version'
puts "Testing ActiveRecord #{ActiveRecord::VERSION::STRING}"

require 'test/unit'
require "#{File.dirname(__FILE__)}/../lib/deadlock_retry"
Expand Down

0 comments on commit 1984eee

Please sign in to comment.