Displaying 1 result from an estimated 1 matches for "register_item_test".
2007 Jan 04
6
after_update attributes problem
...t_equal -113.44, account.balance #this assertion passes
transaction.amount = -15.50
transaction.save
assert_equal -115.50, account.balance # FAILS
transaction.destroy
assert_equal -100.00, account.balance #this assertion will pass
end
FAILURE OUTPUT:
Loaded suite test/unit/register_item_test
Started
.F.
Finished in 0.202591 seconds.
1) Failure:
test_register_item_adjusts_account_balance(RegisterItemTest)
[test/unit/register_item_test.rb:31]:
<-115.5> expected but was
<-113.44>.
3 tests, 6 assertions, 1 failures, 0 errors
So changing the amount on a transaction (Regist...