aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/helper.rb
diff options
context:
space:
mode:
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/]