Module: RSpec::Core::Extensions::Ordered
- Defined in:
- lib/rspec/core/extensions/ordered.rb
Overview
Used to extend lists of examples and groups to support ordering strategies like randomization.
Instance Method Summary collapse
Instance Method Details
#ordered ⇒ Object
10 11 12 13 14 15 16 17 |
# File 'lib/rspec/core/extensions/ordered.rb', line 10 def ordered if RSpec.configuration.randomize? Kernel.srand RSpec.configuration.seed sort_by { Kernel.rand size } else self end end |