require 'sinatra/base' module RSpec class JenkinsServer < Sinatra::Base get('/bad_json') do 'This is not JSON, bro...' end get('/computer/api/json') do content_type 'application/json' File.read(File.expand_path('../../fixtures/computer.json', __FILE__)) end end end