Testing rendering of a given layout with RSpec & Rails

后端 未结 11 1438
滥情空心
滥情空心 2020-12-24 12:31

Is it possible to test the use of a given layout using RSpec with Rails, for example I\'d like a matcher that does the following:

response.should use_layout(         


        
11条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-24 13:17

    response.should render_template("layouts/some_folder/some_layout") response.should render_template("template-name")

提交回复
热议问题