Sha256: 469499e4df218d222c17e872027ec88789e97c3b053cb712b652995830ed7a68
Contents?: true
Size: 649 Bytes
Versions: 11
Compression:
Stored size: 649 Bytes
Contents
# -*- encoding: utf-8 -*- require 'spec_helper' require 'money' Money.default_currency = 'EUR' module HappyHelpers module Helpers describe Numbers do describe "#currency" do include Numbers it "formats the given numerical value as a currency string" do currency(1).should == "€1,00" currency(1234.567).should == "€1.234,57" end it "also accept string values" do currency("EUR 12,99").should == '€12,99' end it "knows how to deal with negative values" do currency(-1234.56).should == '€-1.234,56' end end end end end
Version data entries
11 entries across 11 versions & 1 rubygems