dockrails icon indicating copy to clipboard operation
dockrails copied to clipboard

Improve test environment

Open superbilk opened this issue 6 years ago • 3 comments

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

superbilk avatar Aug 13 '17 21:08 superbilk

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

rake test

gmontard avatar Aug 21 '17 12:08 gmontard

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

superbilk avatar Aug 21 '17 19:08 superbilk

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.

gmontard avatar Aug 22 '17 11:08 gmontard