thoughtbot / vim-rspec

Run Rspec specs from Vim
https://robots.thoughtbot.com
MIT License
656 stars 108 forks source link

Autochdir #46

Closed spinlock99 closed 10 years ago

spinlock99 commented 10 years ago

This is my workaround for issue #40. Mostly a recommendation for how to configure g:rspec_command when autochdir is set. Also makes small change to RunAllSpecs() which should not(TM) affect other users.

gylaz commented 10 years ago

I believe this will only work in spec/ directory. From spec/models/ directory, I get:

cannot load such file -- spec_helper

It makes sense, since spec_helper's path is not in the load path.

spinlock99 commented 10 years ago

You're right. That's what I get for testing against a toy project instead of a real one. I think setting autochdir is probably not going to be compatible with vim-rspec.