RSpec

Library providing tools for writing and running RSpec tests.

Module: RSpec::SleepingKingStudios::Concerns::FocusExamples

Parent Namespace
RSpec::SleepingKingStudios::Concerns
Defined In
lib/rspec/sleeping_king_studios/concerns/focus_examples.rb

Table Of Contents

Overview

Convenience methods for automatically focusing or skipping shared example groups.

Back To Top

Instance Methods

#finclude_examples name, *args, **kwargs, &block => Object

Also known as: finclude_context

Note: Do not use this method with example groups that have side effects, e.g. define a memoized #let helper or a #before block that is intended to modify the behavior of sibling examples. Wrapping the example group in a describe block breaks that relationship. Best practice is to use the #wrap_examples method to safely encapsulate example groups with side effects, and the #fwrap_examples method to automatically focus such groups.

Includes the specified shared example group and wraps it inside an fdescribe block named “(focused)”. If the spec runner is set to run only focused specs, this will ensure that the wrapped example group is run.

Parameters

Yields

#xinclude_examples name, *args, **kwargs, &block => Object

Also known as: xinclude_context

Note: Do not use this method with example groups that have side effects, e.g. define a memoized #let helper or a #before block that is intended to modify the behavior of sibling examples. Wrapping the example group in a describe block breaks that relationship. Best practice is to use the #wrap_examples method to safely encapsulate example groups with side effects, and the #xwrap_examples method to automatically skip such groups.

Includes the specified shared example group and wraps it inside an xdescribe block named “(skipped)”. This will ensure that the wrapped example group is not run.

groups.

Parameters

Yields

Back To Top


Back to Documentation | Versions | 2.8 | Reference | RSpec | RSpec::SleepingKingStudios | RSpec::SleepingKingStudios::Concerns