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