Rspec and named routes

前端 未结 6 1511
爱一瞬间的悲伤
爱一瞬间的悲伤 2020-11-30 06:49

I\'m quite new to rails, and trying to follow the railstutorial. Everything goes fine, except for my tests which can\'t get past the named routes (5.3.3)

My routes.r

6条回答
  •  悲&欢浪女
    2020-11-30 07:12

    I don't think you have access to named routes inside of your rspec controller specs. You could however just do visit('/'), which is the equivalent of root_path.

提交回复
热议问题