riboseinc / digicert

Ruby bindings for the Digicert Services API
https://www.digicert.com/services/v2/documentation
MIT License
8 stars 10 forks source link

Add container management request spec #76

Closed abunashir closed 7 years ago

abunashir commented 7 years ago

As of now, our test suite is using an API response stubs, which is identical to actual response but way much faster. But in some time there might be some changes in the actual API, so it would be best to have some specs that can test actual API response

This commit adds mechanism so we can add an api_call: true tag to any specs and that will actually perform an API call.

We also changed our spec_helper, by default those slow, real API call will be skipped, but we can run those by running bin/rspec --tag api_call

ronaldtse commented 7 years ago

​Abu this seems like the best of all worlds and the pull request looks good. Perhaps the request_helper.rb could be renamed to something more obvious because it sounds a bit like request specs for integration specs, like perform_actual_net_connection.rb. Good work here!

abunashir commented 7 years ago

Great, To be honest, that was bugging me too, this was a temporary solution but now as this way is a go so I will try to configure the spec_helper based on the api_call tag and that way developer does not need to require separate file :)