arthurnn / minitest-emacs

A minitest mode for emacs
49 stars 26 forks source link

Add: custom vars to use bin/rails test command and docker prefix #43

Closed gcentauri closed 4 years ago

gcentauri commented 4 years ago

Adds custom variables:

Rails has adopted minitest as its default testing framework and it is invoked by default with bin/rails test in Rails v4+. If the minitest-use-rails var is truthy, minitest-test-command will use the bin/rails test command.

mintest-use-docker is for invoking the test suite inside of a dockerized application. The minitest-docker-container variable lets the user specify the name of the container to target. minitest-docker-command defaults to docker-compose exec (which appears to be the current recommended way to set up rails apps with docker) but can be customized as needed by the user.

I then modified the minitest-test-command to take these new variables into account when constructing the command to run.

It Works!

image

gcentauri commented 4 years ago

I just looked at https://github.com/pezra/rspec-mode#docker , and realized it may be useful to add more custom variables for the user to specify how to run docker instead of hard coding the command.

I'm out of time for now, but I'll try to update the PR when I can.

gcentauri commented 4 years ago

@arthurnn - i've updated this PR - been using the changes locally myself for a week and its what works in my setup, though i've tried to make it customizable enough so anyone could use it.

Also, I noticed its been some time since this repo has been updated, if you need any help maintaining it I have regular amounts of time i can give and I'm using minitest-mode daily at work. just let me know if you'd like any help.

arthurnn commented 4 years ago

Also, I noticed its been some time since this repo has been updated, if you need any help maintaining it I have regular amounts of time i can give and I'm using minitest-mode daily at work. just let me know if you'd like any help.

Awesome.. thanks for the offering.. I will add you as a contributor