Let us first create a new folder under /spec named requests
request specs are written while develop a controller request
Create file '/api/v1/books_spec.rb'
Let us run it
$ rspec spec/requests/api/v1/books_spec.rb
Let us inspect the error
No route matches [GET] "/api/v1/books.json"
Why? Because we haven't defined routes