Skip to content

Commit

Permalink
Make sure negative sign is included in dollars when negative integer …
Browse files Browse the repository at this point in the history
…is set
  • Loading branch information
samvincent committed Apr 11, 2013
1 parent 8cd84f3 commit e361670
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions spec/has_money_spec.rb
Expand Up @@ -34,6 +34,11 @@
it "should return the amount in dollars" do
@product.price_in_dollars.should == '29.99'
end

it "should return the amount in dollars correctly when negative" do
@product.price = -4200
@product.price_in_dollars.should == '-42.00'
end

it "should set the amount in dollars with a float" do
@product.price_in_dollars = 39.99
Expand Down

0 comments on commit e361670

Please sign in to comment.