Module: RSpec::Support::Spec

### Home Classes Methods

### In Files

- lib/rspec/support/spec.rb

### Methods

- ::setup_simplecov

### Class/Module Index

Quicksearch

- RSpec
- RSpec::CallerFilter
- RSpec::Support
- RSpec::Support::BlockSignature
- RSpec::Support::Differ
- RSpec::Support::DirectoryMaker
- RSpec::Support::EncodedString
- RSpec::Support::FormattingSupport
- RSpec::Support::FuzzyMatcher
- RSpec::Support::HunkGenerator
- RSpec::Support::InSubProcess
- RSpec::Support::LooseSignatureVerifier
- RSpec::Support::LooseSignatureVerifier::SignatureWithKeywordArgumentsMatcher
- RSpec::Support::MethodSignature
- RSpec::Support::MethodSignatureVerifier
- RSpec::Support::OS
- RSpec::Support::RecursiveConstMethods
- RSpec::Support::Ruby
- RSpec::Support::RubyFeatures
- RSpec::Support::ShellOut
- RSpec::Support::Spec
- RSpec::Support::StdErrSplitter
- RSpec::Support::StrictSignatureVerifier
- RSpec::Support::Version
- RSpec::Support::VersionChecker
- RSpec::Support::Warnings
- RSpec::Support::WarningsPrevention
- RSpec::Support::WithIsolatedStdErr
- Object
- RSpecHelpers

No matching classes.

# RSpec::Support::Spec

### Public Class Methods

setup_simplecov(&block) click to toggle source

    # File lib/rspec/support/spec.rb, line 42
    def self.setup_simplecov(&block)
      # Simplecov emits some ruby warnings when loaded, so silence them.
      old_verbose, $VERBOSE = $VERBOSE, false

      return if ENV['NO_COVERAGE'] || RUBY_VERSION < '1.9.3' || RUBY_ENGINE != 'ruby'

      # Don't load it when we're running a single isolated
      # test file rather than the whole suite.
      return if RSpec.configuration.files_to_run.one?

      require 'simplecov'
      start_simplecov(&block)
    rescue LoadError
      warn "Simplecov could not be loaded"
    ensure
      $VERBOSE = old_verbose
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.