Permalink
Browse files

Remove/update outdated README sections

  • Loading branch information...
1 parent 8c6ff16 commit 7a856b702befb475499f76b4916198e105a968f4 @joliss joliss committed Jan 4, 2012
Showing with 4 additions and 12 deletions.
  1. +4 −12 README.md
View
@@ -376,10 +376,12 @@ page.has_no_selector?(:content)
page.has_xpath?('//table/tr')
page.has_css?('table tr.foo')
-page.has_content?('foo')
-page.has_text?('foo')
+page.has_text?('foo') # synonymously: page.has_content?('foo')
```
+**Note:** The negative forms like `has_no_selector?` are different from `not
+has_selector?`. Read the section on asynchronous JavaScript for an explanation.
+
You can use these with RSpec's magic matchers:
```ruby
@@ -390,18 +392,8 @@ page.should have_no_selector(:content)
page.should have_xpath('//table/tr')
page.should have_css('table tr.foo')
page.should have_text('foo')
-page.should have_no_text('foo')
```
-**Note** that there are 2 matchers for checking content/text. `page.has_text?('foo')`
-will check only for text that is displayable, whereas `page.has_content?('foo')` will
-check for the content within any nodes (including the head section and within script tags).
-Most of the time you'll want the behaviour of `page.has_text?('foo')`, so go with that
-unless you have a specific reason to use `page.has_content?('foo')` instead.
-
-**Note**: `page.should have_no_xpath` is preferred over `page.should_not have_xpath`.
-Read the section on asynchronous JavaScript for an explanation.
-
If all else fails, you can also use the
<tt>[page.html](http://rubydoc.info/github/jnicklas/capybara/master/Capybara/Session#html-instance_method)</tt>
method to test against the raw HTML:

0 comments on commit 7a856b7

Please sign in to comment.