1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Remove unnecessary Random::DEFAULT expectations

The respond_to expectation just suffice as duck-typing.
This commit is contained in:
Nobuyoshi Nakada 2020-11-27 21:42:46 +09:00
parent 789da481fc
commit 84891bffe8
Notes: git 2022-01-01 18:56:12 +09:00

View file

@ -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')