O'Reilly logo

Effective Testing with RSpec 3 by Myron Marston, Ian Dees

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Changing How Your Specs Run

RSpec allows you to change the way your specs behave using metadata. You’ve already used this ability several times as you’ve worked through this book. Here are the metadata options that affect how RSpec runs your examples:

:aggregate_failures

Changes how RSpec reacts to failure so that each example runs to completion (instead of stopping at the first failed expectation)

:pending

Indicates that you expect the example to fail; RSpec will run it and report it as pending if it did fail, or report it as a failure if it passed

:skip

Tells RSpec to skip the example entirely but still list the example in the output (unlike with filtering, which omits the example from the output)

:order

Sets the order in which RSpec runs your ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required