Module: RSpec

### Home Classes Methods

### In Files

- lib/rspec/core.rb
- lib/rspec/core/backtrace_cleaner.rb
- lib/rspec/core/backward_compatibility.rb
- lib/rspec/core/command_line.rb
- lib/rspec/core/configuration.rb
- lib/rspec/core/configuration_options.rb
- lib/rspec/core/deprecation.rb
- lib/rspec/core/drb_command_line.rb
- lib/rspec/core/dsl.rb
- lib/rspec/core/example.rb
- lib/rspec/core/example_group.rb
- lib/rspec/core/extensions/instance_eval_with_args.rb
- lib/rspec/core/extensions/module_eval_with_args.rb
- lib/rspec/core/extensions/ordered.rb
- lib/rspec/core/filter_manager.rb
- lib/rspec/core/formatters/base_formatter.rb
- lib/rspec/core/formatters/base_text_formatter.rb
- lib/rspec/core/formatters/deprecation_formatter.rb
- lib/rspec/core/formatters/documentation_formatter.rb
- lib/rspec/core/formatters/helpers.rb
- lib/rspec/core/formatters/html_formatter.rb
- lib/rspec/core/formatters/html_printer.rb
- lib/rspec/core/formatters/json_formatter.rb
- lib/rspec/core/formatters/progress_formatter.rb
- lib/rspec/core/formatters/snippet_extractor.rb
- lib/rspec/core/formatters/text_mate_formatter.rb
- lib/rspec/core/hooks.rb
- lib/rspec/core/memoized_helpers.rb
- lib/rspec/core/metadata.rb
- lib/rspec/core/mocking/with_absolutely_nothing.rb
- lib/rspec/core/mocking/with_flexmock.rb
- lib/rspec/core/mocking/with_mocha.rb
- lib/rspec/core/mocking/with_rr.rb
- lib/rspec/core/mocking/with_rspec.rb
- lib/rspec/core/metadata_hash_builder.rb
- lib/rspec/core/pending.rb
- lib/rspec/core/project_initializer.rb
- lib/rspec/core/rake_task.rb
- lib/rspec/core/ruby_project.rb
- lib/rspec/core/runner.rb
- lib/rspec/core/shared_context.rb
- lib/rspec/core/shared_example_group.rb
- lib/rspec/core/shared_example_group/collection.rb
- lib/rspec/core/version.rb
- lib/rspec/core/world.rb

### Namespace

- MODULE RSpec::Core
- MODULE RSpec::Rake
- MODULE RSpec::Runner

### Methods

- ::clear_remaining_example_groups
- ::configuration
- ::configuration=
- ::configure
- ::const_missing
- ::reset
- ::wants_to_quit
- ::wants_to_quit=
- ::windows_os?
- ::world
- ::world=

### Class/Module Index

Quicksearch

- RSpec
- RSpec::Core
- RSpec::Core::BacktraceCleaner
- RSpec::Core::BacktraceFormatter
- RSpec::Core::CommandLine
- RSpec::Core::Configuration
- RSpec::Core::Configuration::MustBeConfiguredBeforeExampleGroupsError
- RSpec::Core::ConfigurationOptions
- RSpec::Core::ConstMissing
- RSpec::Core::DRbCommandLine
- RSpec::Core::DSL
- RSpec::Core::Deprecation
- RSpec::Core::DrbOptions
- RSpec::Core::Example
- RSpec::Core::Example::NotPendingExampleFixed
- RSpec::Core::Example::Procsy
- RSpec::Core::ExampleGroup
- RSpec::Core::Extensions
- RSpec::Core::Extensions::InstanceEvalWithArgs
- RSpec::Core::Extensions::ModuleEvalWithArgs
- RSpec::Core::Extensions::Ordered
- RSpec::Core::Extensions::Ordered::ExampleGroups
- RSpec::Core::Extensions::Ordered::Examples
- RSpec::Core::FilterManager
- RSpec::Core::FilterManager::BackwardCompatibility
- RSpec::Core::FilterManager::Describable
- RSpec::Core::Formatters
- RSpec::Core::Formatters::BaseFormatter
- RSpec::Core::Formatters::BaseTextFormatter
- RSpec::Core::Formatters::DeprecationFormatter
- RSpec::Core::Formatters::DocumentationFormatter
- RSpec::Core::Formatters::Helpers
- RSpec::Core::Formatters::HtmlFormatter
- RSpec::Core::Formatters::HtmlPrinter
- RSpec::Core::Formatters::JsonFormatter
- RSpec::Core::Formatters::ProgressFormatter
- RSpec::Core::Formatters::SnippetExtractor
- RSpec::Core::Formatters::SnippetExtractor::NullConverter
- RSpec::Core::Formatters::TextMateFormatter
- RSpec::Core::Hooks
- RSpec::Core::Hooks::AfterAllHook
- RSpec::Core::Hooks::AfterHook
- RSpec::Core::Hooks::AroundHook
- RSpec::Core::Hooks::AroundHookCollection
- RSpec::Core::Hooks::BeforeHook
- RSpec::Core::Hooks::GroupHookCollection
- RSpec::Core::Hooks::Hook
- RSpec::Core::Hooks::HookCollection
- RSpec::Core::Hooks::HookCollectionAliases
- RSpec::Core::Hooks::RegistersGlobals
- RSpec::Core::MemoizedHelpers
- RSpec::Core::MemoizedHelpers::BeforeAllMemoizedHash
- RSpec::Core::MemoizedHelpers::ClassMethods
- RSpec::Core::Metadata
- RSpec::Core::Metadata::ExampleMetadataHash
- RSpec::Core::Metadata::GroupMetadataHash
- RSpec::Core::Metadata::MetadataHash
- RSpec::Core::MetadataHashBuilder
- RSpec::Core::MetadataHashBuilder::Common
- RSpec::Core::MetadataHashBuilder::WithConfigWarning
- RSpec::Core::MetadataHashBuilder::WithDeprecationWarning
- RSpec::Core::MockFrameworkAdapter
- RSpec::Core::Parser
- RSpec::Core::Pending
- RSpec::Core::Pending::PendingDeclaredInExample
- RSpec::Core::Pending::PendingExampleFixedError
- RSpec::Core::ProjectInitializer
- RSpec::Core::RakeTask
- RSpec::Core::Reporter
- RSpec::Core::RubyProject
- RSpec::Core::Runner
- RSpec::Core::SharedContext
- RSpec::Core::SharedExampleGroup
- RSpec::Core::SharedExampleGroup::Collection
- RSpec::Core::SharedExampleGroup::Registry
- RSpec::Core::SharedExampleGroup::TopLevelDSL
- RSpec::Core::Time
- RSpec::Core::Version
- RSpec::Core::World
- RSpec::Rake
- RSpec::Runner
- Autotest
- Autotest::Rspec2
- Kernel

No matching classes.

# RSpec

### Constants

MODULES_TO_AUTOLOAD
SharedContext

### Public Class Methods

clear_remaining_example_groups() click to toggle source

@private Used internally to clear remaining groups when fail_fast is set

    # File lib/rspec/core.rb, line 125
    def self.clear_remaining_example_groups
      world.example_groups.clear
    end

configuration() click to toggle source

Returns the global [Configuration](RSpec/Core/Configuration) object. While you can use this method to access the configuration, the more common convention is to use [RSpec.configure](RSpec#configure-class_method).

@example

    RSpec.configuration.drb_port = 1234

@see RSpec.configure @see Core::Configuration

    # File lib/rspec/core.rb, line 87
    def self.configuration
      if block_given?
        RSpec.warn_deprecation *****************************************************************DEPRECATION WARNING* RSpec.configuration with a block is deprecated and has no effect.* please use RSpec.configure with a block instead.Called from #{caller(0)[1]}*****************************************************************
      end
      @configuration ||= RSpec::Core::Configuration.new
    end

configuration=(new_configuration) click to toggle source

@private Used internally to set the global object

    # File lib/rspec/core.rb, line 107
    def self.configuration=(new_configuration)
      @configuration = new_configuration
    end

configure() click to toggle source

Yields the global configuration to a block. @yield [Configuration] global configuration

@example

    RSpec.configure do |config|
      config.add_formatter 'documentation'
    end

@see Core::Configuration

    # File lib/rspec/core.rb, line 119
    def self.configure
      yield configuration if block_given?
    end

const_missing(name) click to toggle source

    # File lib/rspec/core.rb, line 152
    def self.const_missing(name)
      # 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.
      #
      # As of rspec 2.14.1, we no longer require `rspec/mocks` and
      # `rspec/expectations` when `rspec` is required, so we want
      # to make them available as an autoload. For more info, see:
      require MODULES_TO_AUTOLOAD.fetch(name) { return super }
      ::RSpec.const_get(name)
    end

reset() click to toggle source

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

    # File lib/rspec/core.rb, line 74
    def self.reset
      @world = nil
      @configuration = nil
    end

wants_to_quit() click to toggle source

@private

    # File lib/rspec/core.rb, line 48
    def self.wants_to_quit
    # Used internally to determine what to do when a SIGINT is received
      world.wants_to_quit
    end

wants_to_quit=(maybe) click to toggle source

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

    # File lib/rspec/core.rb, line 55
    def self.wants_to_quit=(maybe)
      world.wants_to_quit=(maybe)
    end

windows_os?() click to toggle source

@private

    # File lib/rspec/core.rb, line 130
    def self.windows_os?
      RbConfig::CONFIG['host_os'] =~ /cygwin|mswin|mingw|bccwin|wince|emx/
    end

world() click to toggle source

@private Internal container for global non-configuration data

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

world=(new_world) click to toggle source

@private Used internally to set the global object

    # File lib/rspec/core.rb, line 67
    def self.world=(new_world)
      @world = new_world
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.