You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 30, 2024. It is now read-only.
Copy file name to clipboardExpand all lines: features/example_groups/shared_context.feature
-12Lines changed: 0 additions & 12 deletions
Original file line number
Diff line number
Diff line change
@@ -2,21 +2,9 @@ Feature: shared context
2
2
3
3
Use `shared_context` to define a block that will be evaluated in the context of example groups either locally, using `include_context` in an example group, or globally using `config.include_context`.
4
4
5
-
When implicitly including shared contexts via matching metadata, the normal way is to define matching metadata on an example group, in which case the context is included in the entire group. However, you also have the option to include it in an individual example instead. RSpec treats every example as having a singleton example group (analogous to Ruby's singleton classes) containing just the one example.
6
-
7
5
Background:
8
6
Given a file named "shared_stuff.rb" with:
9
7
"""ruby
10
-
RSpec.configure do |rspec|
11
-
# This config option will be enabled by default on RSpec 4,
12
-
# but for reasons of backwards compatibility, you have to
13
-
# set it on RSpec 3.
14
-
#
15
-
# It causes the host group and examples to inherit metadata
0 commit comments