Sha256: 4ab1f1a33e4f89968b0b3e8962fc2f0f81db3c747e8f236d5d64a2a6edd74f34
Contents?: true
Size: 511 Bytes
Versions: 14
Compression:
Stored size: 511 Bytes
Contents
# frozen_string_literal: false require 'spec_helper' describe USPSFlags::Rational do it 'renders a simplified fraction as an Array' do expect(described_class.new(Rational(4, 3)).to_simplified_a).to eql([1, Rational(1, 3)]) end it 'renders a proper fraction as String' do expect(described_class.new(Rational(2, 3)).to_simplified_a).to eql('2/3') end it 'renders a simplified fraction as a String' do expect(described_class.new(Rational(4, 3)).to_simplified_s).to eql('1 1/3') end end
Version data entries
14 entries across 14 versions & 1 rubygems