문제

I'm making an app where one of my key pieces of code is executed whenever I receive a status update from an instance of the TweetStream gem's user stream client, and I'm getting to the point where I really need Unit Tests to make sure the code acts properly.

Is there a way of making unit tests for a Twitter User Stream by mocking the methods out or something? Fake requests?

I'm on rails 3.2 ruby 1.9.2

도움이 되었습니까?

해결책

You can use something like this:

https://github.com/stympy/faker

Hope it helps.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top