Browser::Actions specs fixes

This commit is contained in:
erwanlr
2013-04-09 18:27:36 +02:00
parent 3525fb87e2
commit 47fb8b9938
5 changed files with 10 additions and 23 deletions

View File

@@ -170,13 +170,6 @@ class Browser
params
end
# return the response
def run_request(request)
@hydra.queue request
@hydra.run
request.response
end
private
# return Array

View File

@@ -8,7 +8,6 @@ class Browser
#
# @return [ Typhoeus::Response ]
def get(url, params = {})
#Typhoeus.get(url, Browser.instance.merge_request_params(params))
process(url, params.merge(method: :get))
end
@@ -17,7 +16,6 @@ class Browser
#
# @return [ Typhoeus::Response ]
def post(url, params = {})
#Typhoeus.post(url, Browser.instance.merge_request_params(params))
process(url, params.merge(method: :post))
end
@@ -38,11 +36,7 @@ class Browser
#
# @return [ Typhoeus::Response ]
def process(url, params)
browser = Browser.instance
browser.run_request(
browser.forge_request(url, params)
)
Typhoeus::Request.new(url, Browser.instance.merge_request_params(params)).run
end
end