Initial commit

This commit is contained in:
Yaser
2026-08-13 19:50:53 +03:30
commit 38084458fe
879 changed files with 95198 additions and 0 deletions

10
spec/lib/decimal_spec.rb Normal file
View File

@@ -0,0 +1,10 @@
# frozen_string_literal: true
describe String do
it { expect('1.0'.to_d).to eq(BigDecimal('1.0')) }
it { expect('1.'.to_d).to eq(BigDecimal('1.0')) }
it { expect('1'.to_d).to eq(BigDecimal('1.0')) }
it { expect('-1'.to_d).to eq(BigDecimal('-1.0')) }
it { expect(''.to_d).to eq(BigDecimal('0.0')) }
it { expect { 'decimal'.to_d }.to raise_error ArgumentError }
end