rspec/rspec-core — comment on commit 097331905898e8f1f702c8ee8b02e64036761bda
File: spec/command_line/randomize_spec.rb line 26
By justinko:

Unfortunately we need to keep a large number of examples for this spec. Having only 5 will give us a high chance of spec failure (the runs will randomize and return the same ordering).

```shell
ruby-1.9.2-p290 :110 > 1000.times.map { srand; srand(srand % 0xFFFF); 2.times.map { [1,2,3,4,5].sort_by { rand 5 } }.uniq.size }.uniq
=> [2, 1]
```

As you can see above, there is at lease a 1 out of 1,000 chance of the spec failing if we keep it at 5. If we increase the number of examples to 10, we get odds greater than a million:

```shell
ruby-1.9.2-p290 :112 > 1_000_000.times.map { srand; srand(srand % 0xFFFF); 2.times.map { [1,2,3,4,5,6,7,8,9,10].sort_by { rand 10 } }.uniq.size }.uniq
=> [2]
```

I'm going to increase it to ten. Let me know if you have any issues with that.