0

I have a working script that uses the twitter gem in order to pull information from twitter. However I cannot find a way to fake this data for testing without actually calling out to twitter.

Does anyone know of a way to mock this? I'd be up for even writing this by hand, I just cant figure out the proper format.

Thanks.

SlowBucket
  • 167
  • 1
  • 1
  • 10

1 Answers1

1

The best way to do this would be to use the VCR gem. It will record API calls once, then save them to a YAML file to be replayed. You can re-record them if they get out of date as well.

Chris
  • 11,819
  • 19
  • 91
  • 145