rspec/rspec-core — pull request #514 by hexgnu (2011-11-29 19:26:42+00:00)
Title: Instead of using rand in --order random please use Kernel.rand

Hi There,

I found an interesting little bug due to someone monkey patching Array#rand.

When running rspec --order random it would throw an error

Exception encountered: #
backtrace:
/Users/matthewkirk/.rvm/gems/ruby-1.9.2-p290@svsecure/gems/faker-0.3.1/lib/extensions/array.rb:2:in `rand'

I know it's Faker who is monkey patching Array but it seems like an easy enough fix to just call Kernel.rand and Kernel.srand instead of relying on whatever is included at that particular point.

Thanks!