Skip to content

Commit

Permalink
[core] Merge pull request rspec/rspec-core#2878 from rspec/clean-up-t…
Browse files Browse the repository at this point in the history
…rigger_inclusion-related-docs

Clean up documentation leftovers for trigger_inclusion behaviour

---
This commit was imported from rspec/rspec-core@fa0a149.
  • Loading branch information
pirj authored Mar 3, 2021
2 parents 36054ab + 6a11d43 commit 17ebfb0
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 10 deletions.
1 change: 0 additions & 1 deletion rspec-core/features/example_groups/shared_examples.feature
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions rspec-core/lib/rspec/core/hooks.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
9 changes: 3 additions & 6 deletions rspec-core/lib/rspec/core/shared_example_group.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 17ebfb0

Please sign in to comment.