Skip to content

Commit 9526238

Browse files
authored
Merge pull request #65 from prawnpdf/resurrect-spec
Resurrect specs lost in migration long time ago
2 parents c1e39b2 + a176367 commit 9526238

File tree

2 files changed

+16
-14
lines changed

2 files changed

+16
-14
lines changed

spec/pdf/core_decimal_rounding_spec.r

Lines changed: 0 additions & 14 deletions
This file was deleted.
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# frozen_string_literal: true
2+
3+
require 'spec_helper'
4+
5+
RSpec.describe PDF::Core do
6+
example_group 'Decimal rounding' do
7+
it 'rounds floating point numbers to four decimal places' do
8+
expect(described_class.real(1.23456789)).to eq '1.23457'
9+
end
10+
11+
it 'is able to create a PDF parameter list of rounded decimals' do
12+
expect(described_class.real_params([1, 2.345678, Math::PI]))
13+
.to eq '1.0 2.34568 3.14159'
14+
end
15+
end
16+
end

0 commit comments

Comments
 (0)