diff --git a/spec/pdf/core_decimal_rounding_spec.r b/spec/pdf/core_decimal_rounding_spec.r deleted file mode 100644 index 3644c39..0000000 --- a/spec/pdf/core_decimal_rounding_spec.r +++ /dev/null @@ -1,14 +0,0 @@ -require_relative 'spec_helper' - -RSpec.describe PDF::Core do - context 'Decimal rounding' do - it 'rounds floating point numbers to four decimal places' do - expect(described_class.real(1.23456789)).to eq 1.2346 - end - - it 'is able to create a PDF parameter list of rounded decimals' do - expect(described_class.real_params([1, 2.34567, Math::PI])) - .to eq '1.0 2.3457 3.1416' - end - end -end diff --git a/spec/pdf/core_decimal_rounding_spec.rb b/spec/pdf/core_decimal_rounding_spec.rb new file mode 100644 index 0000000..79e9274 --- /dev/null +++ b/spec/pdf/core_decimal_rounding_spec.rb @@ -0,0 +1,16 @@ +# frozen_string_literal: true + +require 'spec_helper' + +RSpec.describe PDF::Core do + example_group 'Decimal rounding' do + it 'rounds floating point numbers to four decimal places' do + expect(described_class.real(1.23456789)).to eq '1.23457' + end + + it 'is able to create a PDF parameter list of rounded decimals' do + expect(described_class.real_params([1, 2.345678, Math::PI])) + .to eq '1.0 2.34568 3.14159' + end + end +end