Sha256: 4e4dbc8ae8699020e57716de68ffb0419697703b9c34699386bb2ccfa6025fe6

Contents?: true

Size: 375 Bytes

Versions: 14

Compression:

Stored size: 375 Bytes

Contents

require File.join(File.dirname(__FILE__) + "/spec_helper")

describe Numeric, "to_cents" do
  it "should be a method" do
    Numeric.instance_methods.should include("to_cents")
    Numeric.new.should respond_to(:to_cents)
  end

  it "should convert float values to \"cents\"" do
    [ 5, 10, 15, 25, 29 ].each do |i|
      i.to_cents.should == (i*100).to_i
    end
  end
end

Version data entries

14 entries across 14 versions & 3 rubygems

Version Path
brightbox-rujitsu-0.1.8 spec/numeric_spec.rb
brightbox-rujitsu-0.1.9 spec/numeric_spec.rb
brightbox-rujitsu-0.2.5 spec/numeric_spec.rb
brightbox-rujitsu-0.2 spec/numeric_spec.rb
rahoulb-rujitsu-0.1.3 spec/numeric_spec.rb
rahoulb-rujitsu-0.1.4 spec/numeric_spec.rb
rahoulb-rujitsu-0.1.5 spec/numeric_spec.rb
rahoulb-rujitsu-0.1.6 spec/numeric_spec.rb
rahoulb-rujitsu-0.1.7 spec/numeric_spec.rb
rahoulb-rujitsu-0.1.8 spec/numeric_spec.rb
rujitsu-0.3.3 spec/numeric_spec.rb
rujitsu-0.3.1 spec/numeric_spec.rb
rujitsu-0.3 spec/numeric_spec.rb
rujitsu-0.2.5 spec/numeric_spec.rb