Ruby on Rails Wednesday, October 30, 2019

Basically the command after `docker-compose run {{container_name}}` is the exact same command you would enter right after logging into the container.

So if you would log into the container and run "bundle exec rake test", and assuming your container is `app`, you would run:

`docker-compose run web bundle exec rake test`

This is, of course, assuming that you can run tests in the container already.



On Wed, Oct 30, 2019 at 12:06 PM Brandon McClelland <brandon@sjgames.com> wrote:
You said "When I log into my custom Docker container, I basically follow the same procedure that the people who rely on their host environments do." Can you run the tests successfully that way?

On Wed, Oct 30, 2019 at 10:58 AM Jason Hsu <jhsu802701@gmail.com> wrote:
I thought that would work, but simplecov isn't loading.


On Wednesday, October 30, 2019 at 10:53:06 AM UTC-5, Brandon McClelland wrote:
You would do something like this (found at https://blog.codeship.com/testing-rails-application-docker/ after googling "running rails test with docker-compose run"):

docker-compose run -e "RAILS_ENV=test" app rake test

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/7bbfbc49-cf34-41ee-9f4b-f9415e631c44%40googlegroups.com.


--
Brandon McClelland
User Support Technician
Steve Jackson Games

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CADuEqHJJaRdzuV9ce5kAhPxsZfm99xS2KfZSaOwc%2Bk03xVyfXQ%40mail.gmail.com.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CA%2BCQ936yZ%3DeFSfeRDg69P66QvT2cOjP2RO8HUs%3DddDwAOrOQPA%40mail.gmail.com.

No comments:

Post a Comment