Last active
September 2, 2021 22:05
-
-
Save thisismydesign/ebe6b7677ac06979627e16b8226c72dc to your computer and use it in GitHub Desktop.
Ruby: Use factories for your webmocks /2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
stub_request(:get, %r{#{ENV['XYZ_SERVICE_SERVER']}/api/v2/get_entities*}) | |
.to_return(build(:xyz_service_get_entities_response)) | |
allow(XyzService).to receive(:get_entities).and_return(build(:xyz_service_get_entities_response)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment