module RSpec

def self.clear_remaining_example_groups

Used internally to clear remaining groups when fail_fast is set
def self.clear_remaining_example_groups
  world.example_groups.clear
end

def self.configuration

Returns the global configuration object
def self.configuration
  @configuration ||= RSpec::Core::Configuration.new
end

def self.configure

end
config.format = 'documentation'
RSpec.configure do |config|

== Examples

Yields the global configuration object
def self.configure
  yield configuration if block_given?
end

def self.reset

the same process.
Used internally to ensure examples get reloaded between multiple runs in
def self.reset
  world.reset
  configuration.reset
end

def self.wants_to_quit

Used internally to determine what to do when a SIGINT is received
def self.wants_to_quit
  world.wants_to_quit
end

def self.wants_to_quit=(maybe)

Used internally to determine what to do when a SIGINT is received
def self.wants_to_quit=(maybe)
  world.wants_to_quit=(maybe)
end

def self.world

Internal container for global non-configuration data
def self.world
  @world ||= RSpec::Core::World.new
end

def deprecate(method, alternate_method=nil, version=nil)

Used internally to print deprecation warnings
def deprecate(method, alternate_method=nil, version=nil)
  version_string = version ? "rspec-#{version}" : "a future version of RSpec"
  message = <<-NOTICE
*************************************************************
ECATION WARNING: you are using deprecated behaviour that will
emoved from #{version_string}.
ller(0)[2]}
method} is deprecated.
CE
  if alternate_method
    message << <<-ADDITIONAL
ease use #{alternate_method} instead.
TIONAL
  end
  message << "*****************************************************************"
  warn_deprecation(message)
end

def warn_deprecation(message)

Used internally to print deprecation warnings
def warn_deprecation(message)
  send :warn, message
end