Created
May 17, 2010 14:11
-
-
Save perryqh/403798 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
context "with valid MortgageUtil" do | |
before(:all) do | |
@mortgage_util = MortgageUtil.new(100000, 6.0, 360, 1200, 1.25) | |
end | |
it "should have proper monthly interest rate" do | |
@mortgage_util.send(:monthly_interst_rate).should == 0.005 | |
end | |
it "should have proper monthly payment" do | |
@mortgage_util.monthly_payment.should be_close(599.55, 0.001) | |
end | |
it "should have proper total fees" do | |
@mortgage_util.total_fees.should be_close(2450, 0.001) | |
end | |
it "should have proper APR" do | |
@mortgage_util.apr.should be_close(6.22726, 0.00001) | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment