tc/paypal_adaptive — pull request #22 by tsmango (2011-10-21 00:07:49+00:00)
Title: Implemented Additional Wrapper Methods & Tests

Commits:

* Refactored wrapper methods to always return `PaypalAdaptive::Response` objects.
* Implemented a `#get_payment_options` wrapper.
* Added tests for `#set_payment_options` and `#get_payment_options`.
* Implemented a `#get_shipping_addresses` wrapper and the related test.
* Refactored the test for `#payment_details`.

Notes:

Only some of the wrapper methods in `PaypalAdaptive::Request` returned `PaypalAdaptive::Response` objects. There may be some reason for this that I don't know, but it seemed like it would be okay (and expected) if every wrapper method returned a `PaypalAdaptive::Response` object and be able to respond to to `#success`? and `#errors`.

I moved the stubbed out `#test_set_payment_options` to it's own file `units/payment_options_test.rb` because, like the `#test_payment_details` method, it needed additional upfront API calls. And because `#get_payment_options` relies on `#set_payment_options`, I tested these together.

Keeping with the separate test file for multi-call tests, I implemented `#test_get_shipping_addresses` in `units/get_shipping_addresses.rb`.

To keep the testing methodology of always loading the data in from a json file consistent, I refactored `#test_payment_details` to act more like the payment options and shipping addresses tests.