Parent

Class/Module Index [+]

Quicksearch

RSpec::Core::Ordering::Random

@private Orders items randomly.

Public Class Methods

new(configuration) click to toggle source
# File lib/rspec/core/ordering.rb, line 25
def initialize(configuration)
  @configuration = configuration
  @used = false
end

Public Instance Methods

order(items) click to toggle source
# File lib/rspec/core/ordering.rb, line 34
def order(items)
  @used = true
  rng = RandomNumberGenerator.new(@configuration.seed)
  shuffle items, rng
end
shuffle(list, rng) click to toggle source
# File lib/rspec/core/ordering.rb, line 41
def shuffle(list, rng)
  list.shuffle(:random => rng)
end
used?() click to toggle source
# File lib/rspec/core/ordering.rb, line 30
def used?
  @used
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.