Skip to content

Commit

Permalink
Fixed BRL so it always has a space between symbol and amount
Browse files Browse the repository at this point in the history
  • Loading branch information
Shane Emmons committed Feb 4, 2010
1 parent d53a146 commit 898d462
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions lib/money/symbols.rb
Expand Up @@ -13,7 +13,7 @@
"LKR" => "₨",
"SEK" => "kr",
"GHC" => "¢",
"BRL" => "R$"
"BRL" => "R$ ",

# Everything else defaults to $
}
}
6 changes: 3 additions & 3 deletions test/money_spec.rb
Expand Up @@ -251,7 +251,7 @@ def to_money
one["LKR"].should == "₨1.00"

# Brazilian Real
one["BRL"].should == "R$1.00"
one["BRL"].should == "R$ 1.00"

# Other
one["SEK"].should == "kr1.00"
Expand Down Expand Up @@ -287,11 +287,11 @@ def to_money
end

specify "#format(:separator => a separator string) works as documented" do
Money.new(100, "BRL").format(:separator => ",").should == "R$1,00"
Money.new(100, "BRL").format(:separator => ",").should == "R$ 1,00"
end

specify "#format(:delimiter => a delimiter string) works as documented" do
Money.new(100000, "BRL").format(:delimiter => ".").should == "R$1.000.00"
Money.new(100000, "BRL").format(:delimiter => ".").should == "R$ 1.000.00"
Money.us_dollar(200000).format(:delimiter => "").should == "$2000.00"
end

Expand Down

0 comments on commit 898d462

Please sign in to comment.