Commit 46d2d63f by ねず Committed by Andrew W. Lee

Fix BigDecimal.new (#634)

`BigDecimal.new` is deprecated in future version of Ruby in favor of using `BigDecimal(...)`.
parent 5ac56e47
...@@ -70,8 +70,8 @@ describe AnnotateModels do # rubocop:disable Metrics/BlockLength ...@@ -70,8 +70,8 @@ describe AnnotateModels do # rubocop:disable Metrics/BlockLength
it { expect(AnnotateModels.quote(25)).to eql('25') } it { expect(AnnotateModels.quote(25)).to eql('25') }
it { expect(AnnotateModels.quote(25.6)).to eql('25.6') } it { expect(AnnotateModels.quote(25.6)).to eql('25.6') }
it { expect(AnnotateModels.quote(1e-20)).to eql('1.0e-20') } it { expect(AnnotateModels.quote(1e-20)).to eql('1.0e-20') }
it { expect(AnnotateModels.quote(BigDecimal.new('1.2'))).to eql('1.2') } it { expect(AnnotateModels.quote(BigDecimal('1.2'))).to eql('1.2') }
it { expect(AnnotateModels.quote([BigDecimal.new('1.2')])).to eql(['1.2']) } it { expect(AnnotateModels.quote([BigDecimal('1.2')])).to eql(['1.2']) }
describe '#parse_options' do describe '#parse_options' do
let(:options) do let(:options) do
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment