Where to test routes in ruby on rails

前端 未结 5 1848
耶瑟儿~
耶瑟儿~ 2021-02-19 00:25

Where to test routes in ruby on rails?

  • unit tests?
  • functional tests?
  • integration tests?

Addition:

To be e

5条回答
  •  说谎
    说谎 (楼主)
    2021-02-19 00:43

    If you are using rspec, then the most natural place for routing tests is in the directory spec/routing. From The Rspec documentation:

    Routing specs are marked by :type => :routing or if you have set config.infer_spec_type_from_file_location! by placing them in spec/routing.

提交回复
热议问题