tpope / vim-rails

rails.vim: Ruby on Rails power tools
http://www.vim.org/scripts/script.php?script_id=1567
4.1k stars 383 forks source link

Support for all three request spec directories #608

Open phantomwhale opened 3 months ago

phantomwhale commented 3 months ago

I'm working in a rails codebase that makes use of all three of the request spec directory locations for different reasons needs. Those being spec/requests, spec/api and spec/integration

(Ref: https://github.com/rspec/rspec-rails/blob/8c17b4e5020a4d264e8a79e294c58b5c1ef2b005/lib/rspec/rails/configuration.rb#L36)

Would it be reasonable to encode these defaults into the vim-rails plugin? I see spec/integration is present in most places that spec/requests is, but spec/api doesn't appear at all.

I took an early stab at this on my own (https://github.com/phantomwhale/vim-rails) but clearly my blind copy/pasting didn't quite have the desired effect (e.g. the alternative file for spec/api/users_spec.rb is app/api/users.rb instead of app/controllers/users_controller.rb)

phantomwhale commented 3 months ago

I am aware that the rails-projections feature can probably get my setup working as intended, but given this is the core rspec rails configuration, this issue is to discuss if it's reasonable to have full support for these directories in the vim-rails plugin out of the box