Skip to content

Instantly share code, notes, and snippets.

@svs
Created October 11, 2012 06:01
Show Gist options
  • Save svs/3870491 to your computer and use it in GitHub Desktop.
Save svs/3870491 to your computer and use it in GitHub Desktop.
before :all do
@loan_product = LoanProduct.new
@loan_product.name = "LP1"
@loan_product.max_amount = 1000
@loan_product.min_amount = 1000
@loan_product.max_interest_rate = 100
@loan_product.min_interest_rate = 0.1
@loan_product.installment_frequency = :weekly
@loan_product.max_number_of_installments = 25
@loan_product.min_number_of_installments = 25
@loan_product.repayment_style = @flat
@loan_product.valid_from = Date.parse('2000-01-01')
@loan_product.valid_upto = Date.parse('2012-01-01')
@loan_product.save
@loan_product.should be_valid
@loan = Factory(:loan,
:amount => 1000, :interest_rate => 0.2, :installment_frequency => :weekly, :number_of_installments => 25,
:scheduled_first_payment_date => "2000-12-06", :applied_on => "2000-02-01", :scheduled_disbursal_date => "2000-06-13",
:applied_by => @manager, :funding_line => @funding_line, :client => @client, :loan_product => @loan_product)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment