mirror of
https://github.com/github/rails.git
synced 2026-04-26 03:00:59 -04:00
Remove helper methods that were moved to helper.rb
Signed-off-by: José Valim <jose.valim@gmail.com>
This commit is contained in:
@@ -1433,19 +1433,4 @@ class BasicsTest < ActiveRecord::TestCase
|
||||
ensure
|
||||
Object.class_eval{ remove_const :UnloadablePost } if defined?(UnloadablePost)
|
||||
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
|
||||
|
||||
def with_active_record_default_timezone(zone)
|
||||
old_zone, ActiveRecord::Base.default_timezone = ActiveRecord::Base.default_timezone, zone
|
||||
yield
|
||||
ensure
|
||||
ActiveRecord::Base.default_timezone = old_zone
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user