Commit cc4266280e7cb6b8eedf74dbfad6fcfc4c20c18b
1 parent
ef30d536
Exists in
master
and in
2 other branches
Fixed warning in tests with Active Record 7 [skip ci]
Showing
2 changed files
with
21 additions
and
1 deletions
Show diff stats
@@ -0,0 +1,16 @@ | @@ -0,0 +1,16 @@ | ||
1 | +source "https://rubygems.org" | ||
2 | + | ||
3 | +gemspec path: ".." | ||
4 | + | ||
5 | +gem "rake" | ||
6 | +gem "minitest", ">= 5" | ||
7 | +gem "sqlite3" | ||
8 | +gem "activerecord", "~> 7.0.0.alpha2" | ||
9 | +gem "actionpack", "~> 7.0.0.alpha2" | ||
10 | +gem "activejob", "~> 7.0.0.alpha2", require: "active_job" | ||
11 | +gem "elasticsearch", "~> 7" | ||
12 | +gem "elasticsearch-xpack", ">= 7.8", "< 7.14" | ||
13 | +gem "redis" | ||
14 | +gem "connection_pool" | ||
15 | +gem "kaminari" | ||
16 | +gem "gemoji-parser" |
test/support/activerecord.rb
@@ -4,7 +4,11 @@ require "active_record" | @@ -4,7 +4,11 @@ require "active_record" | ||
4 | ActiveRecord::Base.logger = $logger | 4 | ActiveRecord::Base.logger = $logger |
5 | 5 | ||
6 | # rails does this in activerecord/lib/active_record/railtie.rb | 6 | # rails does this in activerecord/lib/active_record/railtie.rb |
7 | -ActiveRecord::Base.default_timezone = :utc | 7 | +if ActiveRecord::VERSION::MAJOR >= 7 |
8 | + ActiveRecord.default_timezone = :utc | ||
9 | +else | ||
10 | + ActiveRecord::Base.default_timezone = :utc | ||
11 | +end | ||
8 | ActiveRecord::Base.time_zone_aware_attributes = true | 12 | ActiveRecord::Base.time_zone_aware_attributes = true |
9 | 13 | ||
10 | # migrations | 14 | # migrations |