Sha256: fcecee2083b3ef9d28b8f7965889a2fff8402dc8e61803f24bd407c200ce2a1f

Contents?: true

Size: 406 Bytes

Versions: 1

Compression:

Stored size: 406 Bytes

Contents

require 'spec_helper'

describe BigDecimal do
  it "should render to a nice string" do
    BigDecimal.new('1.9').to_s.should == '1.90'
  end
  
  it "should maintain consistency" do
    BigDecimal.new('1.9').to_s('F').should == '1.9'
  end
  
  describe "#in_cents" do
    subject { BigDecimal.new('9.99') }
    its(:in_cents){  should == 999 }
    its(:in_cents){  should be_a_kind_of(Integer) }
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
big_decimal_price-0.1.2 spec/big_decimal_spec.rb