Module: RspecInContext::ContextManagement

Included in:
RSpec::Core::ExampleGroup
Defined in:
lib/rspec_in_context/context_management.rb

Overview

Allow context to be scoped inside a block

Instance Method Summary collapse

Instance Method Details

#subclass(parent, description, args, registration_collection, &example_group_block) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

prepending a RSpec method so we can know when a describe/context block finish its reading



9
10
11
12
13
# File 'lib/rspec_in_context/context_management.rb', line 9

def subclass(parent, description, args, registration_collection, &example_group_block)
  subclass = super
  RspecInContext::InContext.remove_context(subclass)
  subclass
end