Rails 4 Engines 12 years ago
I have only ever used the global spec folder as a place to store top-level app integration specs. I think it is a huge mistake to give up on the separation of engine code for tests.
HN user
I have only ever used the global spec folder as a place to store top-level app integration specs. I think it is a huge mistake to give up on the separation of engine code for tests.
To your points:
- yep. It is unfortunate. Always stick to the default folder structure (subfolders for modules) to prevent any weird interactions among engines and between engines and the main app.
- Prevent this by not allowing this. You would not have different dependencies within one Rails app and you can't have it with a component-based architecture.
- Routing between engines should be much less frequent than routing within. A perfect case for preventing unnecessary dependencies by creating "engine routing intrefaces"