Run a single example group in RSpec

Posted Over 13 years ago. Visible to the public.

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

spec spec/models/note_spec.rb:545

... 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.

Arne Hartherz
Last edit
Over 12 years ago
Keywords
spec, only
License
Source code in this card is licensed under the MIT License.
Posted by Arne Hartherz to makandra dev (2010-09-14 12:13)