jeudi 25 juin 2015

Rails: Make request to development environment while using tests

I would like to know how I could make a request on my development environment from the tests environment.

I know it's not a good practice but I don't know how to achieve my goal otherwise: On my project, I've created some modules (Newsletter, Search, GuestBook, ...) and I would like to have a table allowing me to enabled or disabled modules. I have created the scaffold for this.

The but of all of this is to not run tests if the setting is disabled in other environments.

My problem is when I make a request to check if the module is enabled or not, it targets the test database and not the development database.

Anyone know how I could solve my problem ? Thanks for your help

Aucun commentaire:

Enregistrer un commentaire