Recently I started to work with Docker in a project, and I ever use vim-test to run test using vim, now to integrate in current docker workflow we need to configure vim-test.
For example to configure to run rspec test inside app
:
let test#ruby#rspec#executable = 'docker-compose exec -e RAILS_ENV=test app rspec'
to run inside to already running app
docker container.
It is very important to add -e RAILS_ENV=test
to send envinroment variables
and set test env inside the rails app.