diff options
Diffstat (limited to 'spec/ruby/core/random/default_spec.rb')
-rw-r--r-- | spec/ruby/core/random/default_spec.rb | 24 |
1 files changed, 7 insertions, 17 deletions
diff --git a/spec/ruby/core/random/default_spec.rb b/spec/ruby/core/random/default_spec.rb index b4ffcb81f4..01d7430df8 100644 --- a/spec/ruby/core/random/default_spec.rb +++ b/spec/ruby/core/random/default_spec.rb @@ -14,26 +14,16 @@ describe "Random::DEFAULT" do seed1.should != seed2 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 + it "refers to the Random class" do + suppress_warning do + Random::DEFAULT.should.equal?(Random) 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 + it "is deprecated" do + -> { + Random::DEFAULT.should.equal?(Random) + }.should complain(/constant Random::DEFAULT is deprecated/) end end |