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-05-31 18:22:49 +02:00
parent f4502b001a
commit 34776105c8
46 changed files with 629 additions and 94 deletions

View file

@ -20,10 +20,16 @@ describe :string_times, shared: true do
it "raises an ArgumentError when given integer is negative" do
-> { @object.call("cool", -3) }.should raise_error(ArgumentError)
-> { @object.call("cool", -3.14) }.should raise_error(ArgumentError)
-> { @object.call("cool", min_long) }.should raise_error(ArgumentError)
end
it "raises a RangeError when given integer is a Bignum" do
-> { @object.call("cool", 999999999999999999999) }.should raise_error(RangeError)
-> { @object.call("", 999999999999999999999) }.should raise_error(RangeError)
end
it "works with huge long values when string is empty" do
@object.call("", max_long).should == ""
end
it "returns subclass instances" do