David Chelimsky wrote: > I'm having a hard time understanding what you're trying to do here. Can > you please post the full before and after code and spec listing in a > gist or pastie? > > http://gist.github.com > http://pastie.org
the before just mock a user. and user request to withdraw money from he's bank account, after that, we record his action like 'david withdraw $10' in bankbook. the problem above is I expect one bankbook 'david withdraw $10' but create two 'david withdraw $10'.in database, just because the I use last api to receive last record. @ning.bankbooks.last.action.should == 'withdraw' I guess I should do a count check like lambda{ withdrawal.process!}.should change {Bankbook.count}.by(1) -- Posted via http://www.ruby-forum.com/. _______________________________________________ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users