mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Restore the global random seed
This commit is contained in:
parent
6c87f8fc29
commit
32ee6f80ee
Notes:
git
2021-12-16 17:44:30 +09:00
1 changed files with 8 additions and 0 deletions
|
@ -2,6 +2,14 @@ require_relative '../../spec_helper'
|
|||
require_relative 'fixtures/classes'
|
||||
|
||||
describe "Kernel#srand" do
|
||||
before :each do
|
||||
@seed = srand
|
||||
end
|
||||
|
||||
after :each do
|
||||
srand(@seed)
|
||||
end
|
||||
|
||||
it "is a private method" do
|
||||
Kernel.should have_private_instance_method(:srand)
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue