diff options
author | Yves Senn <yves.senn@gmail.com> | 2014-01-15 20:34:53 +0100 |
---|---|---|
committer | Yves Senn <yves.senn@gmail.com> | 2014-01-16 09:34:49 +0100 |
commit | fca8b0318efb88a8fafe768443f05a99967a6489 (patch) | |
tree | 35aec1097cc9d02fcf2a5e8731276bc85da40dbe /activerecord/test/cases | |
parent | a7139008399718f7152d7a5485b106c7ba79bca2 (diff) | |
download | rails-fca8b0318efb88a8fafe768443f05a99967a6489.tar.gz rails-fca8b0318efb88a8fafe768443f05a99967a6489.tar.bz2 rails-fca8b0318efb88a8fafe768443f05a99967a6489.zip |
we have `with_env_tz` as global test helper. Remove duplicate.
Diffstat (limited to 'activerecord/test/cases')
-rw-r--r-- | activerecord/test/cases/finder_test.rb | 7 | ||||
-rw-r--r-- | activerecord/test/cases/migration_test.rb | 7 |
2 files changed, 0 insertions, 14 deletions
diff --git a/activerecord/test/cases/finder_test.rb b/activerecord/test/cases/finder_test.rb index 5125d5df2a..9b575557de 100644 --- a/activerecord/test/cases/finder_test.rb +++ b/activerecord/test/cases/finder_test.rb @@ -891,11 +891,4 @@ class FinderTest < ActiveRecord::TestCase ActiveRecord::Base.send(:replace_bind_variables, statement, vars) end end - - def with_env_tz(new_tz = 'US/Eastern') - old_tz, ENV['TZ'] = ENV['TZ'], new_tz - yield - ensure - old_tz ? ENV['TZ'] = old_tz : ENV.delete('TZ') - end end diff --git a/activerecord/test/cases/migration_test.rb b/activerecord/test/cases/migration_test.rb index f2e728146d..1bda472d23 100644 --- a/activerecord/test/cases/migration_test.rb +++ b/activerecord/test/cases/migration_test.rb @@ -534,13 +534,6 @@ class MigrationTest < ActiveRecord::TestCase end protected - def with_env_tz(new_tz = 'US/Eastern') - old_tz, ENV['TZ'] = ENV['TZ'], new_tz - yield - ensure - old_tz ? ENV['TZ'] = old_tz : ENV.delete('TZ') - end - # This is needed to isolate class_attribute assignments like `table_name_prefix` # for each test case. def new_isolated_reminder_class |