Skip to content

Commit

Permalink
we have with_env_tz as global test helper. Remove duplicate.
Browse files Browse the repository at this point in the history
  • Loading branch information
senny committed Jan 16, 2014
1 parent a713900 commit fca8b03
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 14 deletions.
7 changes: 0 additions & 7 deletions activerecord/test/cases/finder_test.rb
Expand Up @@ -891,11 +891,4 @@ def bind(statement, *vars)
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
7 changes: 0 additions & 7 deletions activerecord/test/cases/migration_test.rb
Expand Up @@ -534,13 +534,6 @@ def test_out_of_range_limit_should_raise
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
Expand Down

0 comments on commit fca8b03

Please sign in to comment.