Rspec
Strategies
Caveats
Stubbing
Stub as argument needs to be a string reference, not symbol
let(:address) { '111 Main St' } find_address(address)
When unsure about datashape
When you are unsure about the data shape, call the service in Rails console and see what the returned body looks like
- use
.to_json
method on the returned value