diff options
author | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2020-11-27 21:42:46 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2022-01-01 18:55:52 +0900 |
commit | 84891bffe8e68e12a7881d2bbae0db8267035e8a (patch) | |
tree | a028b1f1213ebbe5a1a2d499232cdf31e01411c6 | |
parent | 789da481fc59ffb1a0d4e4deb0a17ec4fcbd1d58 (diff) |
Remove unnecessary Random::DEFAULT expectations
The respond_to expectation just suffice as duck-typing.
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/5382
-rw-r--r-- | spec/ruby/core/random/default_spec.rb | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/spec/ruby/core/random/default_spec.rb b/spec/ruby/core/random/default_spec.rb index db444d203d..90d3b1720d 100644 --- a/spec/ruby/core/random/default_spec.rb +++ b/spec/ruby/core/random/default_spec.rb @@ -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') |