aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/helper.rb
diff options
context:
space:
mode:
authorMichael Koziarski <michael@koziarski.com>2008-02-06 22:26:47 +0000
committerMichael Koziarski <michael@koziarski.com>2008-02-06 22:26:47 +0000
commitcfb8ba00037296054543fb6f0c5863869fdf072d (patch)
tree733a1c647fe6539f5af9ba70fe69fb3d137d2be9 /activerecord/test/cases/helper.rb
parent13264afb120de1e8a858ef87a619901da5af5972 (diff)
downloadrails-cfb8ba00037296054543fb6f0c5863869fdf072d.tar.gz
rails-cfb8ba00037296054543fb6f0c5863869fdf072d.tar.bz2
rails-cfb8ba00037296054543fb6f0c5863869fdf072d.zip
Add uses_tzinfo to active record tests to prevent breaking the cc.rb build etc. Closes #11034 [mpalmer]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8808 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activerecord/test/cases/helper.rb')
-rw-r--r--activerecord/test/cases/helper.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/activerecord/test/cases/helper.rb b/activerecord/test/cases/helper.rb
index dc83300efa..1040d1ec41 100644
--- a/activerecord/test/cases/helper.rb
+++ b/activerecord/test/cases/helper.rb
@@ -29,6 +29,14 @@ rescue LoadError
$stderr.puts "Skipping #{description} tests. `gem install mocha` and try again."
end
+def uses_tzinfo(description)
+ require 'rubygems'
+ require 'tzinfo'
+ yield
+rescue LoadError
+ $stderr.puts "Skipping #{description} tests. `gem install tzinfo` and try again."
+end
+
ActiveRecord::Base.connection.class.class_eval do
IGNORED_SQL = [/^PRAGMA/, /^SELECT currval/, /^SELECT CAST/, /^SELECT @@IDENTITY/, /^SELECT @@ROWCOUNT/]