Tumblelog by Soup.io
Newer posts are loading.
You are at the newest post.
Click here to check if anything new just came in.

September 02 2009

Stubbing Chained Methods with Rspec - Stack Overflow

Client.stub!(:named_scope).and_return(@clients = mock([Client])) @clients.stub!(:first).and_return(@client = mock(Client))