Undefined method or variable: root_path

I have a strange thing happening. Given this:

rake routes | grep root
WARNING: Nokogiri was built against LibXML version 2.8.0, but has dynamically loaded 2.7.8
admin_root GET /admin(.:format) admin/overview#index
root GET / home_page#show

I’m getting this error:

undefined local variable or method `root_path’ for #Class:0x007fbac0ad2ac8 (NameError)

This is on a work project, for which I’m increasing test coverage. In the TDD workshop, when receiving an undefined ‘root_path’, we went and added it to routes.rb. However, in this project, it’s already there.

Any idea what is happening?

Thanks!
Louise

Mystery solved. I didn’t have the ‘visit’ statement in an it block.