class FakeShopify::StubApp

Public Instance Methods

fixture(api_version, file_name) click to toggle source
# File lib/fake_shopify/stub_app.rb, line 6
def fixture(api_version, file_name)
  file_path = File.join(FakeShopify.fixture_path, api_version.to_s, "#{file_name}.json")
  File.open(file_path, "rb").read
end
json_response(response_code, response_body) click to toggle source
# File lib/fake_shopify/stub_app.rb, line 11
def json_response(response_code, response_body)
  content_type :json
  status response_code
  response_body
end