Displaying 1 result from an estimated 1 matches for "complicatedobject".
2006 Dec 18
4
How to keep mocks consistent?
...ens of tests in less than a second is nice as
well), but I''m concerned about my ability to keep the mocks in my
specs consistent with the behavior of their real-world equivalents.
I''m writing specs for a controller in a Rails application, and I''ve
got stuff like this:
ComplicatedObject.should_receive(:execute).and_return(800.00)
If I change ComplicatedObject.execute down the line to return
something besides a float, this spec will still pass, and the
controller will only fail in real life. So I could have full test
coverage, green lights across the board, and massive amounts of...