ChiliProject is not maintained anymore. Please be advised that there will be no more updates.

We do not recommend that you setup new ChiliProject instances and we urge all existing users to migrate their data to a maintained system, e.g. Redmine. We will provide a migration script later. In the meantime, you can use the instructions by Christian Daehn.

Include capybara for integration tests (Feature #747)

Added by Eric Davis at 2011-12-02 12:22 am. Updated at 2011-12-09 09:29 pm.

Status:Closed Start date:2011-12-02
Priority:Normal Due date:
Assignee:Eric Davis % Done:


Target version:3.0.0
Remote issue URL: Affected version:


I've been using webrat and capybara in my plugins for awhile now and have found capybara to be really useful to drive integration tests.

I propose we include it for 3.0 and then we can start using it as needed (for new tests or existing tests).

The main benefit is that capybara can drive actual usage of the app; things like clicking links and filling out and submitting forms. Right now the integration tests "fake" this by sending get/post/put/delete requests to the server. This will really help with refactoring too, i.e. if a form's url was missed during refactoring, capybara will submit it to the old url, which will fail the test.

I'll supply a pull request in a few minutes (it's just a gem addition and some helpers I've refined).

Associated revisions

Revision 439c6972
Added by Jean-Philippe Lang at 2008-05-17 01:03 pm

Fixed: possible error when attachment's filename is non-ASCII (#747, #1243, #1089).

git-svn-id: e93f8b46-1217-0410-a6f0-8f06a7374b81

Revision a2feb14c
Added by Eric Davis at 2011-12-02 01:46 am

[#747] Include capybara for integration tests

Revision b32fc973
Added by Eric Davis at 2011-12-02 03:13 am

[#747] Add some capybara helper methods


Updated by Eric Davis at 2011-12-02 02:19 am

Pull request ready:

Later on I'd like to port the existing integration tests over but they will need to be done 1-by-1 (e.g. get 'url' vs visit 'url' and click_link). The following snippet should add capybara to an existing integration test:

1class YourIntegrationTest < ActionController::IntegrationTest
2  include IntegrationTestHelpers::CapybaraHelpers
3  include Capybara
5  # ...
  • Status changed from Open to Ready for review

Updated by Eric Davis at 2011-12-09 09:29 pm

Merged into unstable. Feel free to start switching to using capybara or adding some more capybara helpers as needed.

  • Status changed from Ready for review to Closed

Also available in: Atom PDF