I'm having trouble finding a way to check for nested selectors in an view
spec with capybara, which according to this
issue<https://github.com/jnicklas/capybara/issues/384> doesn't
accept a block for have_selector like webrat.
There were a couple workarounds with Object#tap given, but neither worked
for me (with capybara 2.0.1 and rspec 2.12.0), and thread hasn't been
updated in a year.
For clarity, here's what didn't work:
...
render
rendered.find("form") do |form|
form.should have_selector("input")
end
...
Nor did wrapping rendered with Capybara.string as suggested at the bottom
of the thread.
Seems like a common scenario, can someone explain the correct way to do
this?
Thanks!
--
You received this message because you are subscribed to the Google Groups
"rspec" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
To view this discussion on the web visit
https://groups.google.com/d/msg/rspec/-/7w5QqXy79y8J.
For more options, visit https://groups.google.com/groups/opt_out.