1

I have spring binstubs, including bin/rake and bin/rspec

In general, running :Rake runs bin/rake -- yay (cf vim-rails #253).

Running :Rake while editing a _spec.rb file, however, runs rspec from the gem's folder: .../ruby ... .../rspec-core-3.1.6/exe/rspec. This produces different output/errors than when run as bin/rspec or spring rspec (as suggested by guard-spec).

How can I get :Rake to run bin/rspec so I can see the same output/errors from within MacVim/mvim and guard?

1 Answer 1

1

When editing a spec file, vim-rails' :Rrunner invokes bin/rspec directly, thus producing the same output & errors as when run by guard.

vim-rails' :Rake invokes bin/rake spec SPEC=..., which ends up invoking the ruby and rspec paths as shown in the question -- thus the different environment, errors, & output than the spring-ified bin/rspec or spring rspec as run by guard.

2
  • Overwriting my ':Rake' muscle-memory is a 'personal' and not SO-appropriate 'problem' :-) Nov 9, 2014 at 18:11
  • I searched all the internet for this... only when I was writting my question in stackoverflow, crying all my tears, this question showed up. In my case, I was trying to run my specs using :Rails and it didnt go through spring. :Runner solved my problems. Thanks. It was not easy to figure out through help docs.
    – Filipiz
    Nov 22, 2022 at 15:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.