Sha256: 5caf8a39438d907e32762fbf60817bf11232a9da8987598bf9f140b54b538745

Contents?: true

Size: 1.12 KB

Versions: 15

Compression:

Stored size: 1.12 KB

Contents

class RSpec::Core::Example
  # more mutable strings
  def assign_generated_description
    if metadata[:description].empty? && (description = RSpec::Matchers.generated_description)
      metadata[:description] = description
      metadata[:full_description] = metadata[:full_description] + description # mutable string fix
    end
  rescue Exception => e
    set_exception(e, "while assigning the example description")
  ensure
    RSpec::Matchers.clear_generated_description
  end

  # https://github.com/opal/opal/issues/1126
  # Hash.public_instance_methods - Object.public_instance_methods, which is a part of metadata.rb/HashImitatable (included by ExecutionResult), returns the initialize method, which gets marked as deprecated. The intent of the issue_deprecation method though is to shift people away from using this as a hash. Initialize obviously is not indicative of hash usage (any new object will trip this up, and that should not happen).
  class ExecutionResult
    # There is no real constructor to preserve in example.rb's ExecutionResult class, so can eliminate the issue_deprecation call this way
    def initialize; end
  end
end

Version data entries

15 entries across 15 versions & 2 rubygems

Version Path
opal-rspec-0.8.0 lib-opal/opal/rspec/fixes/rspec/core/example.rb
opal-rspec-0.8.0.alpha3 lib-opal/opal/rspec/fixes/rspec/core/example.rb
opal-rspec-0.8.0.alpha2 lib-opal/opal/rspec/fixes/rspec/core/example.rb
opal-rspec-0.8.0.alpha1 lib-opal/opal/rspec/fixes/rspec/core/example.rb
opal-rspec-0.7.1 lib-opal/opal/rspec/fixes/rspec/core/example.rb
opal-rspec-0.7.0 lib-opal/opal/rspec/fixes/rspec/core/example.rb
opal-rspec-0.6.2 opal/opal/rspec/fixes/rspec/core/example.rb
opal-rspec-0.7.0.rc.2 lib-opal/opal/rspec/fixes/rspec/core/example.rb
opal-rspec-0.7.0.rc.1 lib-opal/opal/rspec/fixes/rspec/core/example.rb
opal-rspec-0.6.1 opal/opal/rspec/fixes/rspec/core/example.rb
opal-rspec-0.6.0 opal/opal/rspec/fixes/rspec/core/example.rb
opal-rspec-0.6.0.beta1 opal/opal/rspec/fixes/rspec/core/example.rb
opal-connect-rspec-0.5.0 opal/opal/rspec/fixes/rspec/core/example.rb
opal-rspec-0.5.0 opal/opal/rspec/fixes/rspec/core/example.rb
opal-rspec-0.5.0.beta3 opal/opal/rspec/fixes/rspec/core/example.rb