openshift/os-client-tools — pull request #88 by nhr (2012-07-06 13:58:34+00:00)
Title: Added rspec coverage for Rhc::Rest::Client

Things to consider in reviewing this code:

1. It could probably be DRYed up a bit. I have used 'describe' containers and shared examples to reduce a certain amount of repetition, but there is doubtless more that could be done. The challenge is that the client methods set off chains of web requests that must be mocked in advance, and they all have subtle differences.

2. To ensure that objects are properly returned by the client, I am doing two "levels" of testing:
a. Make sure the object.class matches the expected class
b. Compare some class instance variable values to their expected values

It may be over-constraining to inspect the class instance variables; please let me know if this is the case.