Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update README.md with shared context loading example #3051

Merged
merged 2 commits into from
Oct 25, 2023
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
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,11 @@ pretty much the same as `shared_examples` and `include_examples`, providing
more accurate naming when you share hooks, `let` declarations, helper methods,
etc, but no examples.

If you want to reuse shared examples or contexts across your RSpec suite you can
define them in a stand alone _*.rb_ files (_spec/support/shared_examples/definition.rb_
for example). But you will have to manually `require` them (there is no autoloading of
_spec/support/_ directory unless you set it up yourself).

## Metadata

rspec-core stores a metadata hash with every example and group, which
Expand Down
Loading