I’ve been using have_selector with RSpec (version 2.0.1) successfully. I recently found documentation on have_tag … with_tag … associated with RSpec 1.3.2 and would like to use it, but RSpec gives me the error:
undefined method `has_tag?' for #<ActionController::TestResponse:0x105584e80>
on the following lines:
response.should have_tag("div.breadcrumbs select") do
with_tag(:option, :value => @brands.name)
with_tag(:option, :value => @marketsize.name)
end
I’ve tried the same syntax substituting “have_selector” and “with_selector for “have_tag” and “with_tag”, in which case I get the error message
undefined method `with_selector' for #<RSpec::Core::ExampleGroup::Nested_1::Nested_1::Nested_1::Nested_1:0x105379de8>
I’ve also tried leaving the “with_tag” alone while substituting “have_selector” with no success.
Took me a while to find it in the documentation, but the correct answer is