Module: Affirm::TestingSupport::HttpResponses
- Defined in:
- lib/affirm/testing_support/http_responses.rb
Instance Method Summary collapse
- #read_http_fixture(name) ⇒ Object
- #read_json_fixture(name) ⇒ Object
- #stub_basic_auth ⇒ Object
- #stub_headers ⇒ Object
Instance Method Details
#read_http_fixture(name) ⇒ Object
19 20 21 |
# File 'lib/affirm/testing_support/http_responses.rb', line 19 def read_http_fixture(name) File.read(File.join(File.dirname(__FILE__), "fixtures.http", name)) end |
#read_json_fixture(name) ⇒ Object
23 24 25 |
# File 'lib/affirm/testing_support/http_responses.rb', line 23 def read_json_fixture(name) JSON.parse(File.read(File.join(File.dirname(__FILE__), "fixtures.json", name))) end |