Module: RSpec::Core::SharedExampleGroup::TopLevelDSL Private
- Defined in:
- lib/rspec/core/shared_example_group.rb
Overview
This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.
Shared examples top level DSL
Class Method Summary (collapse)
-
+ (void) expose_globally!
private
Adds the top level DSL methods to Module and the top level binding.
-
+ (void) remove_globally!
private
Removes the top level DSL methods to Module and the top level binding.
Class Method Details
+ (void) expose_globally!
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.
Adds the top level DSL methods to Module and the top level binding
86 87 88 89 90 |
# File 'lib/rspec/core/shared_example_group.rb', line 86 def self.expose_globally! return if exposed_globally? Core::DSL.change_global_dsl(&definitions) @exposed_globally = true end |
+ (void) remove_globally!
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.
Removes the top level DSL methods to Module and the top level binding
95 96 97 98 99 100 101 102 103 104 105 |
# File 'lib/rspec/core/shared_example_group.rb', line 95 def self.remove_globally! return unless exposed_globally? Core::DSL.change_global_dsl do undef shared_examples undef shared_context undef shared_examples_for end @exposed_globally = false end |