diff options
author | Benoit Daloze <[email protected]> | 2020-05-31 18:22:49 +0200 |
---|---|---|
committer | Benoit Daloze <[email protected]> | 2020-05-31 18:22:49 +0200 |
commit | 34776105c8a6739ca3aad1de4a2c942f4a8f2f29 (patch) | |
tree | 0103cf2cc89c1322d8c3e88fff0a80b54db8320b /spec/ruby/shared/string | |
parent | f4502b001a665109bf776f9037ecbc52cb5f2d88 (diff) |
Update to ruby/spec@4e486fa
Diffstat (limited to 'spec/ruby/shared/string')
-rw-r--r-- | spec/ruby/shared/string/times.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/spec/ruby/shared/string/times.rb b/spec/ruby/shared/string/times.rb index 6827db2271..4dd59884c8 100644 --- a/spec/ruby/shared/string/times.rb +++ b/spec/ruby/shared/string/times.rb @@ -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 |