I'm developing a application that uses the twitter API. I'm currently using rspec with mocha, but I found it to be cumbersome and I cannot reuse the mocking that I create for a give method. Is there a way that you can have for a give call, return something, and for another call return something else? Or it needs to be by each method?
+1
A:
Try to use webmock or fake mock.
It allows you to stub HTTP requests and setting expectations on HTTP requests in Ruby.
Read more about mocking here:http://www.ibm.com/developerworks/web/library/wa-mockrails/index.html
rafamvc
2010-10-14 19:04:40