Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

update various things to get the tests to run on 1.9

  • Loading branch information...
commit 2d54ab3895506d324c2be4880023ae56aadc10b7 1 parent ebdd031
@jamesgolick jamesgolick authored
Showing with 7 additions and 5 deletions.
  1. +6 −5 test/config/boot.rb
  2. +1 −0  test/test/test_helper.rb
View
11 test/config/boot.rb
@@ -44,6 +44,7 @@ class VendorBoot < Boot
def load_initializer
require "#{RAILS_ROOT}/vendor/rails/railties/lib/initializer"
Rails::Initializer.run(:install_gem_spec_stubs)
+ Rails::GemDependency.add_frozen_gem_path
end
end
@@ -67,7 +68,7 @@ def load_rails_gem
class << self
def rubygems_version
- Gem::RubyGemsVersion if defined? Gem::RubyGemsVersion
+ Gem::RubyGemsVersion rescue nil
end
def gem_version
@@ -82,14 +83,14 @@ def gem_version
def load_rubygems
require 'rubygems'
-
- unless rubygems_version >= '0.9.4'
- $stderr.puts %(Rails requires RubyGems >= 0.9.4 (you have #{rubygems_version}). Please `gem update --system` and try again.)
+ min_version = '1.3.1'
+ unless rubygems_version >= min_version
+ $stderr.puts %Q(Rails requires RubyGems >= #{min_version} (you have #{rubygems_version}). Please `gem update --system` and try again.)
exit 1
end
rescue LoadError
- $stderr.puts %(Rails requires RubyGems >= 0.9.4. Please install RubyGems and try again: http://rubygems.rubyforge.org)
+ $stderr.puts %Q(Rails requires RubyGems >= #{min_version}. Please install RubyGems and try again: http://rubygems.rubyforge.org)
exit 1
end
View
1  test/test/test_helper.rb
@@ -1,4 +1,5 @@
$:.reject! { |path| path.include? 'TextMate' }
+require 'test/unit'
ENV["RAILS_ENV"] = "test"
require File.expand_path(File.dirname(__FILE__) + "/../config/environment")
require 'test_help'
Please sign in to comment.
Something went wrong with that request. Please try again.