mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Update to ruby/spec@8cafaa5
This commit is contained in:
parent
1b377b32c8
commit
2e32b919b4
35 changed files with 832 additions and 10 deletions
|
@ -29,4 +29,13 @@ describe "Integer#digits" do
|
|||
it "raises Math::DomainError when calling digits on a negative number" do
|
||||
-> { -12345.digits(7) }.should raise_error(Math::DomainError)
|
||||
end
|
||||
|
||||
it "returns integer values > 9 when base is above 10" do
|
||||
1234.digits(16).should == [2, 13, 4]
|
||||
end
|
||||
|
||||
it "can be used with base > 37" do
|
||||
1234.digits(100).should == [34, 12]
|
||||
980099.digits(100).should == [99, 0, 98]
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue