Method: RSpec::Core::Configuration#expose_dsl_globally=

Defined in:
lib/rspec/core/configuration.rb

#expose_dsl_globally=(value) ⇒ void

Use this to expose the core RSpec DSL via Module and the main object. It will be set automatically but you can override it to remove the DSL. Default: true



151
152
153
154
155
156
157
158
159
# File 'lib/rspec/core/configuration.rb', line 151

def expose_dsl_globally=(value)
  if value
    Core::DSL.expose_globally!
    Core::SharedExampleGroup::TopLevelDSL.expose_globally!
  else
    Core::DSL.remove_globally!
    Core::SharedExampleGroup::TopLevelDSL.remove_globally!
  end
end