I'm using rails.vim and when I use :A on a model file, it opens the corresponding testunit file. How do I make it open the corresponding rspec file?
Asked
Active
Viewed 951 times
4
-
Do you have both a test/unit and a spec for the same class/file? – Jesse Wolgamott Oct 07 '11 at 19:55
-
Yeah, it looks like I have both an rspec and test/unit file for the model I was trying. – double free Oct 07 '11 at 20:13
-
1Looks like if I remove my test/unit file, then :A will open the corresponding rspec file. – double free Oct 07 '11 at 23:56
1 Answers
4
Rails.vim will load test/unit first (if it exists), then rspec.
So, fix the framework you use most often and keep your stuff in either the test or spec folders.

Jesse Wolgamott
- 40,197
- 4
- 83
- 109
-
Yup, that's exactly what I found out. I removed my testunit stuff; now when I use :A it loads my corresponding rspec files, just like I wanted. – double free Oct 08 '11 at 02:56
-
How exactly does it "load" it? It keeps trying to open test/unit/whatever_test.rb for me, even though I use RSpec and only have the spec/ directory (test/ does not exist.) – Emil Ahlbäck Nov 26 '12 at 06:21