On a freshly created Rails project (generated by rails someName), one can run some ‘default’ rake tasks like:
rake testrake db:migrate- etc
Question is, where does these tasks get described? The default Rakefile doesn’t have all these tasks.
Furthermore, I checked out some project that uses rspec and I am able to run rake spec to run all the tests. Where does the spec target defined?
Rake tasks are automatically loaded from the folder structure
lib/tasks/*.rakeWhen we are talking about the task db:migrate for example, it is located within the rails gem in
lib/tasks/databases.rakeSo for a specific project, you will always have the tasks within the project folder structure as well as all tasks within the specified gems.