1

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?

Machavity
  • 30,841
  • 27
  • 92
  • 100
rafamvc
  • 8,227
  • 6
  • 31
  • 34

1 Answers1

1

Try to use webmock or fake mock.

It allows you to stub HTTP requests and setting expectations on HTTP requests in Ruby.

rafamvc
  • 8,227
  • 6
  • 31
  • 34