Methods

Class/Module Index [+]

Quicksearch

RSpec::Core::Extensions::Ordered

@private Used to extend lists of examples and groups to support ordering strategies like randomization.

Public Instance Methods

ordered() click to toggle source

@private

# 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

[Validate]

Generated with the Darkfish Rdoc Generator 2.