I do not see a mistake. But I guess the problem is with your schema format.
config.active_record.schema_format = :sql
in application.rb should be what you need to do.
The reason for this is that by default your test database is not created from a schema, but only from db / schema.rb, which knows nothing about mysql functions.
sql schema format will do mysqldump (or pg_dump) if only the schema flag is set to true and creates the development_structure.sql file.
source share