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 2020-06-27 15:51:37 +02:00
parent 64d8c0815e
commit b3fa158d1c
35 changed files with 652 additions and 56 deletions

View file

@ -43,5 +43,9 @@ describe "Integer#pow" do
it "raises a ZeroDivisionError when the given argument is 0" do
-> { 2.pow(5, 0) }.should raise_error(ZeroDivisionError)
end
it "raises a RangeError when the first argument is negative and the second argument is present" do
-> { 2.pow(-5, 1) }.should raise_error(RangeError)
end
end
end