Skip to content

Commit

Permalink
Added test demostrating failure to properly format negative money amount
Browse files Browse the repository at this point in the history
  • Loading branch information
Rod Turnham committed Jun 5, 2014
1 parent 456c414 commit db1ce75
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Gemfile
Expand Up @@ -2,7 +2,7 @@ source "https://rubygems.org"

gemspec

RAILS_VERSION = ENV.fetch('RAILS_VERSION', '4.1.0')
RAILS_VERSION = ENV.fetch('RAILS_VERSION', '4.1.1')
gem "activesupport", RAILS_VERSION
gem "actionpack", RAILS_VERSION
gem "actionmailer", RAILS_VERSION
Expand Down
4 changes: 3 additions & 1 deletion spec/dossier/formatter_spec.rb
Expand Up @@ -68,7 +68,9 @@
10_000 => '$10,000.00',
10_000.00 => '$10,000.00',
1_000_000_000.000 => '$1,000,000,000.00',
'12345.6788' => '$12,345.68'
'12345.6788' => '$12,345.68',
0.01 => '$0.01',
-0.01 => '-$0.01'
}.each { |base, formatted|
it "formats #{base} as #{formatted}" do
expect(formatter.number_to_dollars(base)).to eq formatted
Expand Down

0 comments on commit db1ce75

Please sign in to comment.