1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
This commit is contained in:
Benoit Daloze 2021-10-20 21:41:46 +02:00
parent 207a5a5bc1
commit a6c6eef04a
44 changed files with 1141 additions and 250 deletions

View file

@ -0,0 +1,21 @@
require_relative '../../spec_helper'
describe "Integer#zero?" do
it "returns true if self is 0" do
0.should.zero?
1.should_not.zero?
-1.should_not.zero?
end
ruby_version_is "3.0" do
it "Integer#zero? overrides Numeric#zero?" do
42.method(:zero?).owner.should == Integer
end
end
ruby_version_is ""..."3.0" do
it "Integer#zero? uses Numeric#zero?" do
42.method(:zero?).owner.should == Numeric
end
end
end