# Generic example or template for RSpec request tests for autogenerated scaffold code

**URL:** <https://www.ruby-forum.com/t/generic-example-or-template-for-rspec-request-tests-for-autogenerated-scaffold-code/259315>\
**Category:** RSpec\
**Created:** [April 21, 2020, 3:35pm UTC](https://www.ruby-forum.com/t/generic-example-or-template-for-rspec-request-tests-for-autogenerated-scaffold-code/259315 "2020-04-21T15:35:50Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![EthanS](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/bc8723/32.png) [@EthanS](https://www.ruby-forum.com/u/EthanS)\
**Post date:** [April 21, 2020, 3:35pm UTC](https://www.ruby-forum.com/t/generic-example-or-template-for-rspec-request-tests-for-autogenerated-scaffold-code/259315/1 "2020-04-21T15:35:50Z")

</div>

I am just learning RSpec. I generated resources using rails generate scaffold …

I am now creating RSpec tests for the generated code. This is a generic need. Does anyone have an example or template for testing basic requests (get, index, destroy, update, create) in RSpec?

Since the code is autogenerated, I am not planning on creating unit tests, just the request tests. If I add special logic, I will do TDD.

---

<div class="post-metadata">

**Author:** ![michellesans142](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/d78d45/32.png) [@michellesans142](https://www.ruby-forum.com/u/michellesans142)\
**Post date:** [November 4, 2021, 12:43pm UTC](https://www.ruby-forum.com/t/generic-example-or-template-for-rspec-request-tests-for-autogenerated-scaffold-code/259315/2 "2021-11-04T12:43:54Z")

</div>

Good its not important to create units.
