Skip to content

Latest commit

 

History

History
32 lines (17 loc) · 707 Bytes

step-5-write-the-first-request-spec.md

File metadata and controls

32 lines (17 loc) · 707 Bytes

<< 4. Write the User Story

>> 6. Defining Routes

Write the First Request Spec

Let us first create a new folder under /spec named requests

What are request specs ?

request specs are written while develop a controller request

Create file '/api/v1/books_spec.rb'

1

Let us run it

$ rspec spec/requests/api/v1/books_spec.rb

1

Let us inspect the error

No route matches [GET] "/api/v1/books.json"

Why? Because we haven't defined routes

<< 4. Write the User Story

>> 6. Defining Routes