Contents

Controller specs

A controller spec is an RSpec wrapper for a Rails functional test. It allows you to simulate a single http request in each example, and then specify expected outcomes, such as:

To specify outcomes, you can use:

Conventions:

Source: features/controller_specs/README.md at v2.3.1, RSpec Rails (MIT license).