Module: RSpec::Core::Warnings Private
Do not use. This module is for internal use only.
Relationships & Source Files | |
Extension / Inclusion / Inheritance Descendants | |
Extended In:
| |
Defined in: | rspec-core/lib/rspec/core/warnings.rb |
Instance Method Summary
-
#deprecate(deprecated, data = {})
Internal use only
Used internally to print deprecation warnings.
-
#warn_deprecation(message, opts = {})
Internal use only
Used internally to print deprecation warnings.
- #warn_with(message, options = {}) Internal use only
Instance Method Details
#deprecate(deprecated, data = {})
Used internally to print deprecation warnings.
# File 'rspec-core/lib/rspec/core/warnings.rb', line 10
def deprecate(deprecated, data={}) RSpec.configuration.reporter.deprecation( { :deprecated => deprecated, :call_site => CallerFilter.first_non_rspec_line }.merge(data) ) end
#warn_deprecation(message, opts = {})
Used internally to print deprecation warnings.
# File 'rspec-core/lib/rspec/core/warnings.rb', line 22
def warn_deprecation(, opts={}) RSpec.configuration.reporter.deprecation opts.merge(: => ) end
#warn_with(message, options = {})
[ GitHub ]# File 'rspec-core/lib/rspec/core/warnings.rb', line 27
def warn_with(, ={}) if [:use_spec_location_as_call_site] += "." unless .end_with?(".") if RSpec.current_example += " Warning generated from spec at `#{RSpec.current_example.location}`." end end super(, ) end