Method: RSpec::Core::Configuration#include_context
- Defined in:
- lib/rspec/core/configuration.rb
#include_context(shared_group_name, *filters) ⇒ void
Note:
Filtered context inclusions can also be applied to individual examples that have matching metadata. Just like Ruby's object model is that every object has a singleton class which has only a single instance, RSpec's model is that every example has a singleton example group containing just the one example.
Tells RSpec to include the named shared example group in example groups.
Use filters to constrain the groups or examples in which to include
the example group.
1482 1483 1484 1485 |
# File 'lib/rspec/core/configuration.rb', line 1482 def include_context(shared_group_name, *filters) shared_module = world.shared_example_group_registry.find([:main], shared_group_name) include shared_module, *filters end |