I am getting no route matches error when I test a view which uses
#url_for to form path. My application runs fine when I load the view but
rspec tests can't find the route. I don't want to mock #url_for.
Is there a way to make this work without mocking? Thanks in advance.
1) shared/menu when manual_personnel is disabled displays
Failure/Error: render template: 'shared/_menu'
ActionView::Template::Error:
No route matches {:action=>"index", :controller=>"gadgets"}
#
/Users/tc/.rvm/gems/ruby-2.2.3/gems/actionpack-4.2.4/lib/action_dispatch/journey/formatter.rb:46:in
`generate'
#
/Users/tc/.rvm/gems/ruby-2.2.3/gems/actionpack-4.2.4/lib/action_dispatch/routing/route_set.rb:729:in
`generate'
#
/Users/tc/.rvm/gems/ruby-2.2.3/gems/actionpack-4.2.4/lib/action_dispatch/routing/route_set.rb:760:in
`generate'
#
/Users/tc/.rvm/gems/ruby-2.2.3/gems/actionpack-4.2.4/lib/action_dispatch/routing/route_set.rb:803:in
`url_for'
#
/Users/tc/.rvm/gems/ruby-2.2.3/gems/actionpack-4.2.4/lib/action_dispatch/routing/url_for.rb:156:in
`url_for'
#
/Users/tc/.rvm/gems/ruby-2.2.3/gems/actionview-4.2.4/lib/action_view/routing_url_for.rb:94:in
`url_for'
--
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 post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/rspec/0a7e8e9d-25ab-48c1-8f1c-f14af0e58ed8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.