Skip to content
sheerun edited this page Aug 1, 2012 · 2 revisions

money

Generates monetary value in range (:min..:max). Minimum defaults to 0. Maximum to 10.

Forgery(:monetary).money(:min => 12, :max => 14) 
# => "13.56"

formatted_money

Accepts the same options as money. Format is hard-cored to dollars.

Forgery(:monetary).formatted_money(:min => 12, :max => 14)
# => "$12.67"
Clone this wiki locally