Skip to content

Commit eb65fcd

Browse files
committed
Fix deprecation warning from Rails 8 alpha
1 parent fa7a7f3 commit eb65fcd

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

spec/spec_helper.rb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,11 @@ def self.run_all(reporter = nil)
3636
end
3737
end
3838

39+
# This behaviour will become the default in Rails 8, for now it silences a deprecation
40+
if ActiveSupport.respond_to?(:to_time_preserves_timezone)
41+
ActiveSupport.to_time_preserves_timezone = true
42+
end
43+
3944
# See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
4045
RSpec.configure do |config|
4146
# Bring in the failure matchers from rspec-expectations

0 commit comments

Comments
 (0)