gmontard / dockrails

Simple CLI to Generate and Run a Rails environment with Docker (in Development) !
https://mythoughts.io/using-rails-and-docker-in-development-making-it-play-nice-together-41ef20ef78b0
MIT License
282 stars 20 forks source link

Improve test environment #4

Open superbilk opened 7 years ago

superbilk commented 7 years ago

hi, first of all thanks for that awesome gem!

you could add some insights how you run tests and use the test environment with your setup. maybe as readme or medium article.

The way I would do it is like https://github.com/vovimayhem/docker-compose-rails-dev-example/blob/master/docker-compose.yml#L113 with a test-container running guard. Is that worth a PR? Or do you have something else in mind?

cheers

--chris

gmontard commented 7 years ago

Thank you for your issue. There is already a test coverage written using rspec, you can try it with this command:

rake test
superbilk commented 7 years ago

hi, sorry for being unclear. that "issue" was not about he test coverage of your gem, but how you use dockrails with tests in your rails app. You could just run them locally (that works out of the box, but you miss the pros from docker) or you might spin a new container for running tests or you could run a test container continuously with guard.

Questions in general are: logging, auto-running tests on changing files. and maybe advanced: including frontend-tests.

I'd like to learn more about your setup and your recommendations.

--chris

gmontard commented 7 years ago

Hmm that's a fair point, to be honest I usually really on something like CircleCI so I don't really bother setting up a full test env - that said what you are proposing sounds to be a good idea. Obviously you can always run your tests locally using the same container used to run the dev env.

If you have something in mind that can work easily don't hesitate to submit a PR, I'll be glad to look at it.

Thanks.