ruby-on-railsrspeccapybarasystem-testing

Difference between feature spec and system spec


Is there a difference between a feature spec and system spec? Both seem to use Capybara to test the full application yet they have different docs on RSpec.


Solution

  • System specs are built on top of Rails own system tests while feature specs were implemented by RSpec before Rails had system tests. If you're starting a new project write system specs, but if you have existing feature specs there's really nothing to be gained currently by changing them to system specs since functionality wise they're basically identical.