jnicklas/capybara — Issue #525: have_selector could be more picky with its input
Author: jdelStrother
Created: 2011-10-19 17:43:34+00:00
State: open

Heya,

I discovered a couple of points in our tests where we weren't testing what we thought we were. Along the lines of :

```
rendered.should have_selector(".banner", :content=>"wooo")
```
or

```
rendered.should have_selector("#header") do |header|
header.should have_selector("ul.navlinks")
end
```

Both of which silently pass - however, capybara doesn't support a :content option (it should be :text), and it doesn't support passing blocks to have_selector (a common mistake from Webrat switchers).

Any thoughts about making capybara warn or even raise an error on unexpected input here?