Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Back to RDoc for Readme

Hoe doesn't understand markdown
commit cd4198eac69a257a022f34c50292f3bcafe150ec 1 parent 55d58d1
Dennis Rogenius and Jonas Nicklas authored committed
Showing with 28 additions and 26 deletions.
  1. +1 −1  Manifest.txt
  2. +25 −25 README.md → README.rdoc
  3. +2 −0  Rakefile
2  Manifest.txt
View
@@ -1,6 +1,6 @@
History.txt
Manifest.txt
-README.md
+README.rdoc
Rakefile
examples/webcat.rb
lib/capybara.rb
50 README.md → README.rdoc
View
@@ -1,8 +1,8 @@
-# capybara
+= capybara
* http://github.com/jnicklas/capybara
-## Description:
+== Description:
Capybara aims to simplify the process of integration testing Rack applications,
such as Rails, Sinatra or Merb. It is inspired by and aims to replace Webrat as
@@ -10,16 +10,16 @@ a DSL for interacting with a webapplication. It is agnostic about the driver
running your tests and currently comes bundled with rack-test, Culerity and
Selenium support built in.
-## Disclaimer:
+== Disclaimer:
Capybara is alpha level software, don't use it unless you're prepared to get
your hands dirty.
-## Using Capybara with Cucumber
+== Using Capybara with Cucumber
Capybara is built to work nicely with Cucumber. The API is very similar to
Webrat, so if you know Webrat you should feel right at home. Remove any
-references to Webrat from your `env.rb`, if you're using Rails, make sure to set
+references to Webrat from your <tt>env.rb</tt>, if you're using Rails, make sure to set
Cucumber::Rails::World.use_transactional_fixtures = false
@@ -44,7 +44,7 @@ Now you can use it in your steps:
click_link 'Sign in'
end
-## Default and current driver
+== Default and current driver
You can set up a default driver for your features. For example if you'd prefer
to run Selenium, you could do:
@@ -58,12 +58,12 @@ You can change the driver temporarily:
Capybara.current_driver = :culerity
Capybara.use_default_driver
-## Cucumber and Tags
+== Cucumber and Tags
Capybara sets up some [tags](http://wiki.github.com/aslakhellesoy/cucumber/tags)
for you to use in Cucumber. Often you'll want to use run only some scenarios
with a driver that supports JavaScript, Capybara makes this easy: simply tag the
-scenario (or feature) with `@javascript`:
+scenario (or feature) with <tt>@javascript</tt>:
@javascript
Scenario: do something AJAXy
@@ -74,10 +74,10 @@ You can change which driver Capybara uses for JavaScript:
Capybara.javascript_driver = :culerity
-There are also explicit `@selenium`, `@culerity` and `@rack_test` tags set up
+There are also explicit <tt>@selenium</tt>, <tt>@culerity</tt> and <tt>@rack_test</tt> tags set up
for you.
-## The API
+== The API
Navigation:
@@ -113,7 +113,7 @@ Debugging:
save_and_open_page
-## Using the DSL outside cucumber
+== Using the DSL outside cucumber
You can mix the DSL into any context, for example you could use it in RSpec
examples. Just load the dsl and include it anywhere:
@@ -130,7 +130,7 @@ examples. Just load the dsl and include it anywhere:
end
click_link 'Sign in'
-## Using the sessions manually
+== Using the sessions manually
For ultimate control, you can instantiate and use a session manually.
@@ -143,21 +143,21 @@ For ultimate control, you can instantiate and use a session manually.
end
session.click_link 'Sign in'
-## Install:
+== Install:
Capybara is hosted on Gemcutter, install it with:
sudo gem install capybara
-## Gotchas:
+== Gotchas:
* Everything is *case sensitive*. Capybara heavily relies on XPath, which
doesn't support case insensitive searches.
-* The `have_tag` and `have_text` matchers in RSpec-Rails are not supported.
- You should use `page.should have_css('#header p')`,
- `page.should have_xpath('//ul/li')` and `page.should have_content('Monkey')`
- instead.
+* The <tt>have_tag</tt> and <tt>have_text</tt> matchers in RSpec-Rails are not
+ supported. You should use <tt>page.should have_css('#header p')</tt>,
+ <tt>page.should have_xpath('//ul/li')</tt> and <tt>page.should
+ have_content('Monkey')</tt> instead.
* Unchecking checkboxes and filling in password fields is currently broken under
Culerity.
@@ -168,21 +168,21 @@ Capybara is hosted on Gemcutter, install it with:
[default_url_options](https://gist.github.com/643a758320a2926bd2ed) in Rails
for example.
-* The `set_hidden_field` method from Webrat is not implemented, since it doesn't
+* The <tt>set_hidden_field</tt> method from Webrat is not implemented, since it doesn't
work in any of the browser based drivers (Culerity, Selenium)
* Access to session, request and response from the test is not possible. Maybe
we'll do response headers at some point in the future, but the others really
shouldn't be touched in an integration test anyway.
-* Access to Rails specific stuff (such as `controller`) is unavailable, since
- we're not using Rails' integration testing.
+* Access to Rails specific stuff (such as <tt>controller</tt>) is unavailable,
+ since we're not using Rails' integration testing.
-* `<a href="#">` Will cause problems under rack-test, please do
- `<a href="/same/url#">` instead. You can achieve this in Rails with
- `link_to('foo', :anchor => '')`
+* <tt><a href="#"></tt> Will cause problems under rack-test, please do
+ <tt><a href="/same/url#"></tt> instead. You can achieve this in Rails with
+ <tt>link_to('foo', :anchor => '')</tt>
-## License:
+== License:
(The MIT License)
2  Rakefile
View
@@ -13,6 +13,8 @@ Hoe.plugin :newgem
$hoe = Hoe.spec 'capybara' do
self.developer 'Jonas Nicklas', 'jonas.nicklas@gmail.com'
self.rubyforge_name = self.name # TODO this is default value
+ self.readme_file = 'README.rdoc'
+ self.extra_rdoc_files = ['README.rdoc']
self.extra_deps = [
['nokogiri', '>= 1.3.3'],
Please sign in to comment.
Something went wrong with that request. Please try again.