Module: RSpec::Support::Warnings

### Home Classes Methods

### In Files

- lib/rspec/support/warnings.rb

### Methods

- #deprecate
- #warn_deprecation
- #warn_with
- #warning

### 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::Warnings

### Public Instance Methods

deprecate(deprecated, options={}) click to toggle source

    # File lib/rspec/support/warnings.rb, line 7
    def deprecate(deprecated, options={})
      warn_with "DEPRECATION: #{deprecated} is deprecated.", options
    end

warn_deprecation(message, options={}) click to toggle source

@private

Used internally to print deprecation warnings when rspec-core isn't loaded

    # File lib/rspec/support/warnings.rb, line 15
    def warn_deprecation(message, options={})
      warn_with "DEPRECATION: \n #{message}", options
    end

warn_with(message, options={}) click to toggle source

@private

Used internally to print longer warnings

    # File lib/rspec/support/warnings.rb, line 29
    def warn_with(message, options={})
      call_site = options.fetch(:call_site) { CallerFilter.first_non_rspec_line }
      message << " Use #{options[:replacement]} instead." if options[:replacement]
      message << " Called from #{call_site}." if call_site
      ::Kernel.warn message
    end

warning(text, options={}) click to toggle source

@private

Used internally to print warnings

    # File lib/rspec/support/warnings.rb, line 22
    def warning(text, options={})
      warn_with "WARNING: #{text}.", options
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.