Assuming you wanted to test this with a unit test and you have this code within a method definition, you could mock out the objects and stub some methods.
That said, I don't think unit tests are appropriate for this (nor does betterspec.org).
Since this code is reliant on a third-party library, I think this is where you should use an integration test. Therefore, I would approach this by testing the higher level concepts where this code is used; without knowing what that code does, I would assume something like account creation and account updating. Assuming those two scenarios are the instances when the code is used, I would create either feature or request tests for those two use cases.
Thoughtbot has a great blog post regarding feature tests using Rspec and Caypbara.
The Rspec relish documentation covers both feature specs and request specs.
If I were in your shoes, I'd skip the request specs and focus on the feature specs, but I'm a big fan of just unit tests and high level feature tests.