Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

String#to_money doesn't respect subunit_to_unit #30

Closed
weppos opened this issue Sep 18, 2010 · 3 comments
Closed

String#to_money doesn't respect subunit_to_unit #30

weppos opened this issue Sep 18, 2010 · 3 comments
Labels

Comments

@weppos
Copy link
Member

weppos commented Sep 18, 2010

describe "String#to_money" do
  it "should respect :subunit_to_unit currency property" do
    "1".to_money("USD").should == Money.new(1_00,  "USD")
    "1".to_money("TND").should == Money.new(1_000, "TND")
    "1".to_money("CLP").should == Money.new(1,     "CLP")
  end
end
@semmons99
Copy link
Member

good catch

@semmons99
Copy link
Member

update Money#parse to use :subunit_to_unit (closed by b0fd8a9)

@semmons99
Copy link
Member

closed with commit b0fd8a9

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants