Table of contents

Testing

Test Ruby projects

We use RSpec for both unit/integration testing and acceptance testing via RSpec features. We discourage too much stubbing in tests with the exception of external services.

A combination of RSpec’s feature guide and this Page Object guide should be used in order to keep your RSpec features under control.

Everything you need should be installed and configured if you use the GOV.UK Rails templates.

You can also use govuk_test to setup frontend testing with Capybara and Selenium.

This page was last reviewed on 17 April 2019. It needs to be reviewed again on 17 April 2020 by the page owner #govuk-developers .
This page was set to be reviewed before 17 April 2020 by the page owner #govuk-developers. This might mean the content is out of date.