7 def get_it(path, params = {})
8 @request = Rack::MockRequest.new(Sinatra.application)
9 @response = @request.get(path, :input => params.to_params)
12 def post_it(path, params = {})
13 @request = Rack::MockRequest.new(Sinatra.application)
14 @response = @request.post(path, :input => params.to_params)
17 def put_it(path, params = {})
18 @request = Rack::MockRequest.new(Sinatra.application)
19 @response = @request.put(path, :input => params.to_params)
22 def delete_it(path, params = {})
23 @request = Rack::MockRequest.new(Sinatra.application)
24 @response = @request.delete(path, :input => params.to_params)
28 get_it(@response.location)
31 def method_missing(name, *args)
32 @response.send(name, *args)