简体   繁体   English

Evernote API的RSpec测试

[英]RSpec tests for Evernote API

I have a Rails app that makes calls to the Evernote API. 我有一个Rails应用程序,可以调用Evernote API。 I want to write RSpec tests for these calls. 我想为这些调用编写RSpec测试。 What's the best way of doing that? 最好的方法是什么? I know I can use Webmock or VCR, but - unless I'm mistaken - I would not then be able to have self-contained tests in my repository without pushing either my secret key or a cached oauth response. 我知道我可以使用Webmock或VCR,但是-除非我弄错了-否则如果不推送我的秘密密钥或缓存的oauth响应,我将无法在自己的存储库中进行独立测试。

VCR provides a simple way to filter out sensitive data like secret keys: VCR提供了一种简单的方法来过滤掉敏感数据,例如密钥:

https://relishapp.com/vcr/vcr/v/2-4-0/docs/configuration/filter-sensitive-data ! https://relishapp.com/vcr/vcr/v/2-4-0/docs/configuration/filter-sensitive-data

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM