Read more

Run a single example group in RSpec

Arne Hartherz
September 14, 2010Software engineer at makandra GmbH

To only run a single describe/context block in a long spec, you can say

spec spec/models/note_spec.rb:545
Illustration online protection

Rails Long Term Support

Rails LTS provides security patches for old versions of Ruby on Rails (2.3, 3.2, 4.2 and 5.2)

  • Prevents you from data breaches and liability risks
  • Upgrade at your own pace
  • Works with modern Rubies
Read more Show archive.org snapshot

... where the describe block starts at line 545.

Note: This will only run examples that are direct children of this block, not descendants further down (when nesting describe/context blocks).

You may also pass the line of an it block to run this exact one.

Posted by Arne Hartherz to makandra dev (2010-09-14 14:13)