where is documentation of Rspec?
I saw have_selector
first time today. I want to learn it's options, so I went to official site.
But I can't find it anywhere.
- rspec-core
- rspec-expectation
- rspec-rails
- Relish
I used the search feature in each of the above sites, but in vain.
It's just a small, common method, right? But I can't even read it's API... where is it?
Edit: I use Webr开发者_C百科at. Now I know have_selector
is from it. But seems no useful documentation.
That is one of Capybara's Rspec matchers: Capybara::RSpecMatchers#have_selector.
You can use that method for querying the page for the existence of certain elements using css or xpath notation (examples from Capybara's Readme):
page.should have_selector('table tr')
page.should have_selector(:xpath, '//table/tr')
精彩评论