我应该使用下列哪一项对于采用水豚?:黄瓜&水豚:应该使用rendered.should,page.should或response.should?
rendered.should have_selector
page.should have_selector
response.should have_selector
我似乎无法得到其中的任何工作黄瓜功能 - 我收到一个不同的错误信息为每个
我应该使用下列哪一项对于采用水豚?:黄瓜&水豚:应该使用rendered.should,page.should或response.should?
rendered.should have_selector
page.should have_selector
response.should have_selector
我似乎无法得到其中的任何工作黄瓜功能 - 我收到一个不同的错误信息为每个
经过一些棘手的谷歌代码搜索,答案似乎是
response.should have_selector
正确的方法是page.should have_selector
。请查看README的“查询”部分以获取更多文档。
(有没有叫rendered
(据我所知)方法,并response
存在于Capybara::Driver::RackTest
,但我不知道人们可能会如何使用它 - 我从来没有需要的话)
注意渲染后的`render`可以在视图规格中使用。 – evanrmurphy 2012-03-14 21:28:28