Sha256: 55b10f55da47238624a6c18047aefcba3ea2fb95d59383cd9b2e0fb515ce574d

Contents?: true

Size: 1022 Bytes

Versions: 7065

Compression:

Stored size: 1022 Bytes

Contents

require "rspec/support/warnings"

module RSpec
  module Core
    # @private
    module Warnings
      # @private
      #
      # Used internally to print deprecation warnings.
      def deprecate(deprecated, data={})
        RSpec.configuration.reporter.deprecation(
          {
            :deprecated => deprecated,
            :call_site => CallerFilter.first_non_rspec_line
          }.merge(data)
        )
      end

      # @private
      #
      # Used internally to print deprecation warnings.
      def warn_deprecation(message, opts={})
        RSpec.configuration.reporter.deprecation opts.merge(:message => message)
      end

      # @private
      def warn_with(message, options={})
        if options[:use_spec_location_as_call_site]
          message += "." unless message.end_with?(".")

          if RSpec.current_example
            message += " Warning generated from spec at `#{RSpec.current_example.location}`."
          end
        end

        super(message, options)
      end
    end
  end
end

Version data entries

7,065 entries across 6,983 versions & 126 rubygems

Version Path
mux_ruby-3.20.0 vendor/bundle/ruby/3.2.0/gems/rspec-core-3.11.0/lib/rspec/core/warnings.rb
cybrid_api_bank_ruby-0.123.12 vendor/bundle/ruby/3.3.0/gems/rspec-core-3.13.2/lib/rspec/core/warnings.rb
cybrid_api_organization_ruby-0.123.12 vendor/bundle/ruby/3.3.0/gems/rspec-core-3.13.2/lib/rspec/core/warnings.rb
cybrid_api_id_ruby-0.123.12 vendor/bundle/ruby/3.3.0/gems/rspec-core-3.13.2/lib/rspec/core/warnings.rb
cybrid_api_bank_ruby-0.123.11 vendor/bundle/ruby/3.3.0/gems/rspec-core-3.13.2/lib/rspec/core/warnings.rb
cybrid_api_organization_ruby-0.123.11 vendor/bundle/ruby/3.3.0/gems/rspec-core-3.13.2/lib/rspec/core/warnings.rb
cybrid_api_id_ruby-0.123.11 vendor/bundle/ruby/3.3.0/gems/rspec-core-3.13.2/lib/rspec/core/warnings.rb
cybrid_api_id_ruby-0.123.10 vendor/bundle/ruby/3.3.0/gems/rspec-core-3.13.2/lib/rspec/core/warnings.rb
cybrid_api_bank_ruby-0.123.10 vendor/bundle/ruby/3.3.0/gems/rspec-core-3.13.2/lib/rspec/core/warnings.rb
cybrid_api_organization_ruby-0.123.10 vendor/bundle/ruby/3.3.0/gems/rspec-core-3.13.2/lib/rspec/core/warnings.rb
cybrid_api_organization_ruby-0.123.7 vendor/bundle/ruby/3.3.0/gems/rspec-core-3.13.2/lib/rspec/core/warnings.rb
cybrid_api_id_ruby-0.123.7 vendor/bundle/ruby/3.3.0/gems/rspec-core-3.13.2/lib/rspec/core/warnings.rb
cybrid_api_bank_ruby-0.123.7 vendor/bundle/ruby/3.3.0/gems/rspec-core-3.13.2/lib/rspec/core/warnings.rb
ory-client-1.15.12 vendor/bundle/ruby/3.1.0/gems/rspec-core-3.13.2/lib/rspec/core/warnings.rb
cybrid_api_bank_ruby-0.123.4 vendor/bundle/ruby/3.3.0/gems/rspec-core-3.13.2/lib/rspec/core/warnings.rb
cybrid_api_id_ruby-0.123.4 vendor/bundle/ruby/3.3.0/gems/rspec-core-3.13.2/lib/rspec/core/warnings.rb
cybrid_api_organization_ruby-0.123.4 vendor/bundle/ruby/3.3.0/gems/rspec-core-3.13.2/lib/rspec/core/warnings.rb
cybrid_api_bank_ruby-0.123.3 vendor/bundle/ruby/3.3.0/gems/rspec-core-3.13.2/lib/rspec/core/warnings.rb
cybrid_api_organization_ruby-0.123.3 vendor/bundle/ruby/3.3.0/gems/rspec-core-3.13.2/lib/rspec/core/warnings.rb
cybrid_api_id_ruby-0.123.3 vendor/bundle/ruby/3.3.0/gems/rspec-core-3.13.2/lib/rspec/core/warnings.rb