From fca8b0318efb88a8fafe768443f05a99967a6489 Mon Sep 17 00:00:00 2001 From: Yves Senn Date: Wed, 15 Jan 2014 20:34:53 +0100 Subject: we have `with_env_tz` as global test helper. Remove duplicate. --- activerecord/test/cases/finder_test.rb | 7 ------- activerecord/test/cases/migration_test.rb | 7 ------- 2 files changed, 14 deletions(-) (limited to 'activerecord/test/cases') 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 -- cgit v1.2.3