pezra / rspec-mode

An RSpec minor mode for Emacs
258 stars 112 forks source link

Fix rspec-run-last-failed, rspec-verify-continue, rspec-verify-matching #174

Closed kzkn closed 5 years ago

kzkn commented 6 years ago

rspec-run-last-failed, rspec-verify-continue and rspec-verify-matching fail because they run with wrong path.

Here is an output example:

bundle exec rspec --options /home/kzkn/.ghq/github.com/kzkn/proj/.rspec /home/kzkn/.ghq/github.com/kzkn/proj/spec/models/spec/models/foo_spec.rb\:43

An error occurred while loading ./spec/models/spec/models/foo_spec.rb.
Failure/Error: load file

LoadError:
  cannot load such file -- /home/kzkn/.ghq/github.com/kzkn/proj/spec/models/spec/models/foo_spec.rb

Unnecessary expand-file-name causes this problem.

https://github.com/pezra/rspec-mode/blob/58b741c1a7ecf3b190d89a56c32c0fa5d44700f2/rspec-mode.el#L843

It was added on developing #170 by me. Removing the expand-file-name solves this problem. Sorry for enbug :(

kzkn commented 6 years ago

This patch fixes all commands that pass relative path to rspec-compile. I confirmed, rspec-run-last-failed, rspec-verify-continue, rspec-verify-matching are fixed with this patch.

dgutov commented 5 years ago

Sorry for the long wait. With so many approvals, I'm going to merge. Thank you!

dgutov commented 5 years ago

/Cc @pezra