-
-
Notifications
You must be signed in to change notification settings - Fork 112
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for request specs in rspec-toggle-spec-and-target? #202
Comments
Hi! Historically, I think, And IIUC this didn't change. Looking at https://github.com/rspec/rspec-rails, it suggests specifying the spec type using the |
In the generators for controllers, it will generate a On the official rspec blog back during the release of rspec 3.5, they mentioned that controller tests were soft deprecated in rails 5. A relevant quote from that article:
With these changes going back to rails 5 released back in 2016, I think it's pretty compelling to add at least an option to toggle to |
All right, then. I suppose this will require some extra logic in Perhaps you'd like to try implementing that? |
Yea I can take a crack at it sometime! May take me a bit and it will be literally the first elisp I've written but I'll check it out sometime soon. I guess what I'd need to do is create a sort of special case for request specs because they, unlike most of the other conventions, don't map 1:1 with the file name and require a little massaging, right? Is there anything I ought to know or that you'd like to see to accept a PR? |
Things to know:
And the functions that I mentioned in the previous message are most likely the only ones that need changing. There are no "unusual" mappings supported by |
Hello! I searched the source code and checked the documentation but I didn't see very much about request specs. Is there anyway to set
rspec-toggle-spec-and-target
to match something inspec/requests/{model-name}_spec.rb
instead ofspec/controllers/{model-name}_controller_spec.rb
? Controller specs seem to be soft-deprecated and rspec stubs request specs instead of controller specs nowadays.The text was updated successfully, but these errors were encountered: