开发者

Mocking local api in cucumber tests

I am writing an app that access a local that lives on a separate path on my own server via ajax requests. However, I want to test the app with cucumber and mock out the backend. Is there something like artiface or sham_rack that 开发者_StackOverflowwould let me do this?


I'd recommend using VCR:

http://relishapp.com/myronmarston/vcr

It allows you to record the requests to the external service once, and then play back the recorded responses when running your tests.


I use MockJson to simulate the response: MockJson website


How about something like http://fakeweb.rubyforge.org/?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜