Testing rendering of a given layout with RSpec & Rails

后端 未结 11 1474
滥情空心
滥情空心 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:06

    There's already a perfectly functional matcher for this:

    response.should render_template(:layout => 'fooo')
    

    (Rspec 2.6.4)

提交回复
热议问题