Sha256: eb6885049c8cea5d88bf5030185983968ac7c1a7088b6f1cef32898bd9d3b0a1

Contents?: true

Size: 590 Bytes

Versions: 7

Compression:

Stored size: 590 Bytes

Contents

# not 100% sure this compat check fixes this, but it's pretty close
unless Opal::RSpec::Compatibility.multiple_module_include_super_works_right?
  module ::RSpec::Core::Warnings
    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
  end
end

Version data entries

7 entries across 7 versions & 2 rubygems

Version Path
opal-rspec-0.6.2 opal/opal/rspec/fixes/rspec/core/warnings.rb
opal-rspec-0.6.1 opal/opal/rspec/fixes/rspec/core/warnings.rb
opal-rspec-0.6.0 opal/opal/rspec/fixes/rspec/core/warnings.rb
opal-rspec-0.6.0.beta1 opal/opal/rspec/fixes/rspec/core/warnings.rb
opal-connect-rspec-0.5.0 opal/opal/rspec/fixes/rspec/core/warnings.rb
opal-rspec-0.5.0 opal/opal/rspec/fixes/rspec/core/warnings.rb
opal-rspec-0.5.0.beta3 opal/opal/rspec/fixes/rspec/core/warnings.rb