Hello again, You are correct, controller specs and request specs are very similar. So most controller spec examples will work fine as request specs.
The difference is that request specs will go through the entire rack middleware stack (which is what the request handling in Rails is made out of) meaning that you must have routes and be authenticated etc as per a normal request. This is what most people tend to want anyway. Chers Jon Rowe --------------------------- [email protected] jonrowe.co.uk On 3 July 2020 at 03:06, Gregory Leepart wrote: > Thanks Jon, > You're right, I did sound confusing, and was very tired when I wrote that but > wanted to get out what I could before I forgot what I 'thought' I knew. > > You were very clear and even doing a little more research I see that yes, > request specs are the way to go. There are not a lot of examples of them, > given controller specs still work and are very similar. > > Thanks again! Nice to post on a forum and get a knowledgeable response! > Greg > > On Monday, June 29, 2020 at 1:40:01 AM UTC-7, Jon Rowe wrote: -- You received this message because you are subscribed to the Google Groups "rspec" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/rspec/dejalu-217-50f5c589-be85-4180-8019-44798fdacb6f%40jonrowe.co.uk.
