I may be something completely obvious here, but why should I do this:
setup do
@person = mock("person")
@person.stub!(:name).and_return("david")
end
Instead
@person = mock("person").stub!(:name).and_return("david")
What is a false ("string") return that does not allow it to be truncated compared to allowing @person to be truncated? Is mock not an object return (maybe it just modifies some internal hash table from mock'ed out and then returns a separate object?
David source
share