Sha256: 09c3686070c4f2dab36a83c71496db94ce963d528098da88f594242ecef99811

Contents?: true

Size: 491 Bytes

Versions: 3

Compression:

Stored size: 491 Bytes

Contents

# backtick_javascript: true

# Random causes problems that can lock up a browser (see README)
class ::RSpec::Core::Ordering::Random
  HIDE_RANDOM_WARNINGS = false

  def initialize(configuration)
    `console.warn("Random order is not currently supported by opal-rspec, using default order.")` unless HIDE_RANDOM_WARNINGS
  end

  # Identity is usually the default, so borrowing its implementation, this forces 'accidental' random usage down that path
  def order(items)
    items
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
opal-rspec-1.1.0.alpha3 lib-opal/opal/rspec/fixes/rspec/core/ordering/random.rb
opal-rspec-1.1.0.alpha2 lib-opal/opal/rspec/fixes/rspec/core/ordering/random.rb
opal-rspec-1.1.0.alpha1 lib-opal/opal/rspec/fixes/rspec/core/ordering/random.rb