I'm building a Rails Engine inside another rails app. The engine's rake tasks seem to get scoped to app:
# inside <app_root>/engines/engine_name
$ rake -T apartment
rake app:apartment:migrate # Migrate all tenants
Whereas from the app's root:
#inside <app_root>/
$ rake -T apartment
rake apartment:migrate # Migrate all tenants
My problem is when I run
# inside <app_root>/engines/engine_name
RAILS_ENV=test rake db:migrate
I get the following error:
rake aborted! Don't know how to build task 'apartment:migrate'
Seems like it should be calling the app:apartment:migrate task, but I'm not sure how to do this so I can test this engine on its own with RSpec