in real world, when user deposit money into their bank, bank have money
and can check deposit record. so what would it be in rspec?

it 'should be deposit $10'
  user.bank.deposit(10)
  user.bank.deposit.saving.should == 10
end

about test , should be deposit $10 is clear? maybe 'should deposit $10
success'?

and when deposit, we should have a deposit record. added another test?

it 'should be a deposit record when deposit $10'
  user.bank.deposit(10)
  user.deposit_record.should == #something.
end

or just mixed it in one test?

it 'should be deposit $10'
  user.bank.deposit(10)
  user.bank.deposit.saving.should == 10
  user.deposit_record.should == #something.
end
-- 
Posted via http://www.ruby-forum.com/.
_______________________________________________
rspec-users mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/rspec-users

Reply via email to