Skip to content
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

Improve generated request specs when no controller actions are added #2375

Closed
klyonrad opened this issue Aug 21, 2020 · 2 comments
Closed

Improve generated request specs when no controller actions are added #2375

klyonrad opened this issue Aug 21, 2020 · 2 comments

Comments

@klyonrad
Copy link
Contributor

Is your feature request related to a problem? Please describe.

When controller generator is used it generates a requests_spec file that is quite empty. It consists only of the describe .. do .. end block without any helping indication that the user can use stuff like expect(response).to have_http_status(200) like it happens when the simpler RequestSpecGenerator is used.

Describe the solution you'd like

when generating a controller the request spec generated will have a different file name and when it is generated without any action it will add just one spec for an index action with a message about adding a real spec.

Describe alternatives you've considered

TBD

Additional context

This issue is extracted from a wish in #2356

I had the idea that we can move the original PR along by separating the issues.

@JonRowe
Copy link
Member

JonRowe commented Aug 24, 2020

This should be fairly easy for someone to add, but I don't have the time to work on the generators myself.

@klyonrad
Copy link
Contributor Author

This was fixed with #2399

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants