No route matches when I run controller rspec ?
namdv-1375 opened this issue · 1 comments
namdv-1375 commented
I'm having trouble running rspec.. I have folder
- app
- controllers
- api
- v1
- timeline_posts_controller.rb
....
- timeline_posts_controller.rb
- v1
- api
- controllers
folder rpsec:
- spec
- controller
- api
- v1
- timeline_posts_controller_spec.rb
- v1
- api
- controller
rails routes:
but a run call when run rspec raise error
get :show, params: { use_route: 'api/v1/timeline_posts/', id: 1 }
ActionController::UrlGenerationError: No route matches {:action=>"show", :controller=>"api/v1/timeline_posts", :id=>1}
from /usr/local/bundle/gems/actionpack-7.1.3.3/lib/action_dispatch/journey/formatter.rb:44:in `path'
...
and other basic ways:
get :show, id: id
get :show, params: {id: id}
-> No route matchesPlease help me, thanks
pirj commented
There is insufficient information to reproduce or help.
We reserve our GitHub issue tracker for feature requests and bugs.
For help, please use https://rspec.info/help or SO. Thanks for understanding.
