This gems makes it possible to use Typhoeus for remote testing.
gem install capybara-typhoeus
Usage without Cucumber
Usage with Cucumber and tags
A @typhoeus tag is added to your hooks when you add the following line to your env.rb
The following scenario will then be using the Typhoeus driver
@typhoeus Scenario: do something with the API Given I send and accept JSON When I send a GET request to /users
When you want to use this driver to test a remote application. You have to set the app_host:
Capybara.app_host = "http://www.yourapp.com"
Note that I haven't tested this case for my self yet. The Capybara tests pass for this situation though so it should work! Please provide me with feedback if it doesn't.
For the tests to make sense, you need to simulate a remote server, simply add this line to your hosts file:
Then you are ready to run the test like so
Note on Patches/Pull Requests
- Fork the project.
- Make your feature addition or bug fix.
- Add tests for it. This is important so I don't break it in a future version unintentionally.
- Commit, do not mess with rakefile, version, or history. (if you want to have your own version, that is fine but bump version in a commit by itself I can ignore when I pull)
- Send me a pull request. Bonus points for topic branches.
Copyright (c) 2010 Tron Jonathan and HALTER Joseph. See LICENSE for details.