Module: RSpec::Core::Warnings

Defined in:
opal/opal/rspec/fixes/rspec/core/warnings.rb

Instance Method Summary collapse

Instance Method Details

#warn_with(message, options = {}) ⇒ Object



4
5
6
7
8
9
10
11
12
13
14
15
16
# File 'opal/opal/rspec/fixes/rspec/core/warnings.rb', line 4

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 won't find this
  # super(message, options)
  support_warn_with message, options
end