Skip to content
This repository has been archived by the owner on Nov 30, 2024. It is now read-only.

Clean up documentation leftovers for trigger_inclusion behaviour #2878

Merged
merged 1 commit into from
Mar 3, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion features/example_groups/shared_examples.feature
Original file line number Diff line number Diff line change
@@ -10,7 +10,6 @@ Feature: shared examples
```ruby
include_examples "name" # include the examples in the current context
it_behaves_like "name" # include the examples in a nested context
matching metadata # include the examples in the current context
```

**WARNING:** Files containing shared groups must be loaded before the files that
6 changes: 3 additions & 3 deletions lib/rspec/core/hooks.rb
Original file line number Diff line number Diff line change
@@ -112,9 +112,9 @@ module Hooks
#
# ### Warning: implicit before blocks
#
# `before` hooks can also be declared in shared contexts which get
# included implicitly either by you or by extension libraries. Since
# RSpec runs these in the order in which they are declared within each
# `before` hooks can also be declared in configuration-level shared contexts
# which get included implicitly either by you or by extension libraries.
# Since RSpec runs these in the order in which they are declared within each
# scope, load order matters, and can lead to confusing results when one
# before block depends on state that is prepared in another before block
# that gets run later.
9 changes: 3 additions & 6 deletions lib/rspec/core/shared_example_group.rb
Original file line number Diff line number Diff line change
@@ -45,9 +45,8 @@ def include_in(klass, inclusion_line, args, customization_block)
# examples that you wish to use in multiple example groups.
#
# When defined, the shared group block is stored for later evaluation.
# It can later be included in an example group either explicitly
# (using `include_examples`, `include_context` or `it_behaves_like`)
# or implicitly (via matching metadata).
# It can later be included in an example group explicitly using
# `include_examples`, `include_context` or `it_behaves_like`.
#
# Named shared example groups are scoped based on where they are
# defined. Shared groups defined in an example group are available
@@ -62,9 +61,7 @@ module SharedExampleGroup
# @overload shared_examples(name, metadata, &block)
# @param name [String, Symbol, Module] identifer to use when looking up
# this shared group
# @param metadata [Array<Symbol>, Hash] metadata to attach to this
# group; any example group or example with matching metadata will
# automatically include this shared example group.
# @param metadata [Array<Symbol>, Hash] metadata to attach to this group
# @param block The block to be eval'd
#
# Stores the block for later use. The block will be evaluated