Skip to content

Commit

Permalink
Remove helper methods that were moved to helper.rb
Browse files Browse the repository at this point in the history
Signed-off-by: José Valim <jose.valim@gmail.com>
  • Loading branch information
miloops authored and josevalim committed Sep 21, 2010
1 parent ae24ce5 commit d64a09b
Showing 1 changed file with 0 additions and 15 deletions.
15 changes: 0 additions & 15 deletions activerecord/test/cases/base_test.rb
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -1433,19 +1433,4 @@ def test_default_scope_is_reset
ensure ensure
Object.class_eval{ remove_const :UnloadablePost } if defined?(UnloadablePost) Object.class_eval{ remove_const :UnloadablePost } if defined?(UnloadablePost)
end 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 end

0 comments on commit d64a09b

Please sign in to comment.