have_tag与Have_selector
|
我已经成功地将have_selector与RSpec(版本2.0.1)一起使用了。我最近在与RSpec 1.3.2关联的have_tag ... with_tag ...文档中找到了文档,并希望使用它,但是RSpec给了我错误:
undefined method `has_tag?\' for #<ActionController::TestResponse:0x105584e80>
在以下几行:
response.should have_tag(\"div.breadcrumbs select\") do
with_tag(:option, :value => @brands.name)
with_tag(:option, :value => @marketsize.name)
end
我尝试用相同的语法将“ have_selector \”和“ with_selector”替换为“ have_tag \”和“ with_tag \”,在这种情况下,我得到了错误消息
undefined method `with_selector\' for #<RSpec::Core::ExampleGroup::Nested_1::Nested_1::Nested_1::Nested_1:0x105379de8>
我还尝试过单独替换\“ with_tag \”,而没有成功地替换\“ have_selector \”。
没有找到相关结果
已邀请:
2 个回复
弛保矮瘦敖
厢界山攀