have_tag vs. have_selector

你离开我真会死。 提交于 2019-12-04 16:47:19

Took me a while to find it in the documentation, but the correct answer is

  response.should have_selector("div.breadcrumbs select") do |content|
    content.should have_selector(:option, :value => @brands.name)
    content.should have_selector(:option, :value => @marketsize.name)
  end

RSpec-2 will not include have_tag. Use webrat's have_selector matcher instead.

http://groups.google.com/group/rspec/browse_thread/thread/1c254524d6859ba9

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!