Alex's Slip-box

These are my org-mode notes in sort of Zettelkasten style

Run tests in docker for ruby-mode

See rspec-mode docs for the variables used below

You could use a .dir-locals.el file in the root of the project directory, configured like this for docker-compose.

((ruby-mode
  (eval . (setq-local rspec-use-docker-when-possible t))
  (eval . (setq-local rspec-docker-command "docker-compose run --rm"))
  (eval . (setq-local rspec-docker-container "ruby"))
  (eval . (setq-local rspec-docker-cwd "/rails/"))
  (eval . (setq-local rspec-docker-file-name "Dockerfile"))))

Or for vanilla docker

((ruby-mode
  (eval . (setq-local rspec-use-docker-when-possible t))
  (eval . (setq-local rspec-docker-command "docker exec -it"))
  (eval . (setq-local rspec-docker-container "ruby"))
  (eval . (setq-local rspec-docker-file-name "Dockerfile"))))

Search Results