Difference with rake db:test:load and rake db:schema:load RAILS_ENV=test with stored procedures/methods

I have function in a MySQL database, created using a migration.

Using the trackles_triggers gem so that it is included in the exported schema.rb, when using the following:

rake db:migrate
rake db:test:purge
rake db:schema:load RAILS_ENV=test

seems to be working as expected with the function being created in the test database.

But using the following as suggested in the guides does not seem to be working:

rake db:migrate
rake db:test:purge
rake db:test:load

Is that the expected behaviour?

Should the rake:test:load be able to recreate the database including the method as described in the guides?

http://guides.rubyonrails.org/testing.html

Using raiils 3.2.15

Thanks

I don’t know why is that task mentioned in the guide.

The test database schema is maintained transparently for you. The normal workflow is:

bundle exec rake

Done. That performs all the necessary setup and runs the suite. (If the development database has pending migrations, you need to run db:migrate in dev mode as usual.)

The setup is also automated for the fine-grained test tasks.

It is very rare that you need to run any db:* task by hand to run the suite.