twitter/twitter-cldr-rb — pull request #37 by camertron (2012-05-28 17:06:37+00:00)
Title: Adding readme tests, fixing number formatting

Yes, this is a pull request for a repo that I have admin access to. I want @KL-7 to be able to see it and comment on it, and I thought this would be the most straightforward way.

@KL-7, this PR takes all examples in the README and makes sure they work. Any time the README is modified, `readme_spec.rb` should be updated as well.

In addition, number formatting (especially in regards to precision) has been re-evaluated. Before, something like: `1337.localize.to_currency.to_s` would return `$1,337` without the decimal that currency values usually have. However, `TwitterCldr::Formatters::CurrencyFormatter.new.format(1337)` would return `$1,337.00`, which is correct. This PR fixes that issue and changes the style of the corresponding tests.