rubyspec/rubyspec — pull request #159 by bak (2012-11-05 06:34:14+00:00)
Title: Improve specs for Array#choice / Array#sample

Four commits dealing with Array#choice and Array#sample

Goal here was to improve spec names and implementations, to reveal what they actually do. This is mainly accomplished by avoiding the language of "testing for randomness" in favor of measurable facets of something that we expect to be random, such as membership in the source array, and distribution of the results. Additionally split an omnibus spec into well-defined expectations.

Note this is a reimplementation of a previously-closed PR, because I changed my mind about how to approach the problem, and wanted to rewrite the commits themselves.