class Wework::MockApi
Private Instance Methods
json_response(file_name)
click to toggle source
# File lib/wework/mock_api.rb, line 22 def json_response file_name content_type :json status 200 file_path = mock_file_path(file_name) file_path = mock_file_path('success.json') unless File.exist?(file_path) File.open(file_path, 'rb').read end
mock_file_path(path)
click to toggle source
# File lib/wework/mock_api.rb, line 30 def mock_file_path path File.join(File.expand_path('../../../mock_responses/', __FILE__), path) end