In Files

Class/Module Index [+]

Quicksearch

RSpec

Constants

SharedContext

Public Class Methods

clear_remaining_example_groups() click to toggle source

Used internally to clear remaining groups when fail_fast is set

# File lib/rspec/core.rb, line 83
def self.clear_remaining_example_groups
  world.example_groups.clear
end
configuration() click to toggle source

Returns the global configuration object

# File lib/rspec/core.rb, line 66
def self.configuration
  @configuration ||= RSpec::Core::Configuration.new
end
configure() click to toggle source

Yields the global configuration object

Examples

RSpec.configure do |config|

config.format = 'documentation'

end

# File lib/rspec/core.rb, line 77
def self.configure
  warn_about_deprecated_configure if RSpec.world.example_groups.any?
  yield configuration if block_given?
end
deprecate(method, alternate_method=nil, version=nil) click to toggle source
# File lib/rspec/core/deprecation.rb, line 4
def deprecate(method, alternate_method=nil, version=nil)
  version_string = version ? "rspec-#{version}" : "a future version of RSpec"

  message = *****************************************************************DEPRECATION WARNING: you are using deprecated behaviour that willbe removed from #{version_string}.#{caller(0)[2]}* #{method} is deprecated.
  if alternate_method
    message << * please use #{alternate_method} instead.
  end

  message << "*****************************************************************"
  warn_deprecation(message)
end
reset() click to toggle source

Used internally to ensure examples get reloaded between multiple runs in the same process.

# File lib/rspec/core.rb, line 60
def self.reset
  world.reset
  configuration.reset
end
wants_to_quit() click to toggle source

Used internally to determine what to do when a SIGINT is received

# File lib/rspec/core.rb, line 44
def self.wants_to_quit
  world.wants_to_quit
end
wants_to_quit=(maybe) click to toggle source

Used internally to determine what to do when a SIGINT is received

# File lib/rspec/core.rb, line 49
def self.wants_to_quit=(maybe)
  world.wants_to_quit=(maybe)
end
warn_deprecation(message) click to toggle source
# File lib/rspec/core/deprecation.rb, line 27
def warn_deprecation(message)
  send :warn, message
end
world() click to toggle source

Internal container for global non-configuration data

# File lib/rspec/core.rb, line 54
def self.world
  @world ||= RSpec::Core::World.new
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.