module RSpec
def self.clear_remaining_example_groups
- Private: -
def self.clear_remaining_example_groups world.example_groups.clear end
def self.configuration
- See: Core::Configuration -
See: RSpec.configure -
def self.configuration if block_given? RSpec.warn_deprecation <<-WARNING *************************************************************** PRECATION WARNING RSpec.configuration with a block is deprecated and has no effect. please use RSpec.configure with a block instead. lled from #{caller(0)[1]} *************************************************************** RNING end @configuration ||= RSpec::Core::Configuration.new end
def self.configure
- See: Core::Configuration -
Other tags:
- Yield: - global configuration
def self.configure yield configuration if block_given? end
def self.const_missing(name)
def self.const_missing(name) case name when :Matchers # Load rspec-expectations when RSpec::Matchers is referenced. This allows # people to define custom matchers (using `RSpec::Matchers.define`) before # rspec-core has loaded rspec-expectations (since it delays the loading of # it to allow users to configure a different assertion/expectation # framework). `autoload` can't be used since it works with ruby's built-in # require (e.g. for files that are available relative to a load path dir), # but not with rubygems' extended require. require 'rspec/expectations' ::RSpec::Matchers else super end end
def self.reset
- Private: -
def self.reset @world = nil @configuration = nil end
def self.wants_to_quit
- Private: -
def self.wants_to_quit # Used internally to determine what to do when a SIGINT is received world.wants_to_quit end
def self.wants_to_quit=(maybe)
- Private: -
def self.wants_to_quit=(maybe) world.wants_to_quit=(maybe) end
def self.windows_os?
- Private: -
def self.windows_os? /mswin|mingw/ === ::RbConfig::CONFIG['host_os'] end
def self.world
- Private: -
def self.world @world ||= RSpec::Core::World.new end
def deprecate(method, alternate_method=nil, version=nil)
- Private: -
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)
- Private: -
def warn_deprecation(message) warn message end