Class: RSpec::Core::Ordering::Random
- Inherits:
-
Object
- Object
- RSpec::Core::Ordering::Random
- Defined in:
- opal/opal/rspec/fixes/rspec/core/ordering/random.rb
Overview
Random causes problems that can lock up a browser (see README)
Constant Summary collapse
- HIDE_RANDOM_WARNINGS =
false
Instance Method Summary collapse
-
#initialize(configuration) ⇒ Random
constructor
A new instance of Random.
-
#order(items) ⇒ Object
Identity is usually the default, so borrowing its implementation, this forces 'accidental' random usage down that path.
Constructor Details
#initialize(configuration) ⇒ Random
Returns a new instance of Random.
5 6 7 |
# File 'opal/opal/rspec/fixes/rspec/core/ordering/random.rb', line 5 def initialize(configuration) `console.warn("Random order is not currently supported by opal-rspec, using default order.")` unless HIDE_RANDOM_WARNINGS end |
Instance Method Details
#order(items) ⇒ Object
Identity is usually the default, so borrowing its implementation, this forces 'accidental' random usage down that path
10 11 12 |
# File 'opal/opal/rspec/fixes/rspec/core/ordering/random.rb', line 10 def order(items) items end |