mirror of
https://github.com/ruby/ruby.git
synced 2026-01-26 20:19:19 +00:00
Remove unnecessary Random::DEFAULT expectations
The respond_to expectation just suffice as duck-typing.
This commit is contained in:
parent
789da481fc
commit
84891bffe8
Notes:
git
2022-01-01 18:56:12 +09:00
@ -7,28 +7,6 @@ describe "Random::DEFAULT" do
|
||||
end
|
||||
end
|
||||
|
||||
ruby_version_is ''...'3.0' do
|
||||
it "returns a Random instance" do
|
||||
suppress_warning do
|
||||
Random::DEFAULT.should be_an_instance_of(Random)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
ruby_version_is '3.0' do
|
||||
it "refers to the Random class" do
|
||||
suppress_warning do
|
||||
Random::DEFAULT.should.equal?(Random)
|
||||
end
|
||||
end
|
||||
|
||||
it "is deprecated" do
|
||||
-> {
|
||||
Random::DEFAULT.should.equal?(Random)
|
||||
}.should complain(/constant Random::DEFAULT is deprecated/)
|
||||
end
|
||||
end
|
||||
|
||||
it "changes seed on reboot" do
|
||||
seed1 = ruby_exe('p Random::DEFAULT.seed', options: '--disable-gems')
|
||||
seed2 = ruby_exe('p Random::DEFAULT.seed', options: '--disable-gems')
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user