Skip to content

Commit

Permalink
Pass encoding in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ankane committed Feb 19, 2023
1 parent 1b5b987 commit 96cba1f
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions test/test_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,11 @@ def self.env
adapter: $adapter,
database: "strong_migrations_test"
}
if $adapter == "mysql2" && ActiveRecord::VERSION::STRING.to_f >= 7.1
connection_options[:prepared_statements] = true
if $adapter == "mysql2"
connection_options[:encoding] = "utf8mb4"
if ActiveRecord::VERSION::STRING.to_f >= 7.1
connection_options[:prepared_statements] = true
end
end
ActiveRecord::Base.establish_connection(**connection_options)

Expand Down

0 comments on commit 96cba1f

Please sign in to comment.