features/steps/remote_service_steps.rb in jugend-httparty-0.5.2.2 vs features/steps/remote_service_steps.rb in jugend-httparty-0.5.2.3
- old
+ new
@@ -11,12 +11,12 @@
Given /that service is accessed at the path '(.*)'/ do |path|
@server.register(path, @handler)
end
Given /^that service takes (\d+) seconds to generate a response$/ do |time|
- @server_response_time = time.to_i
- @handler.preprocessor = lambda { sleep time.to_i }
+ preprocessor = lambda { sleep time.to_i }
+ @handler.preprocessor = preprocessor
end
Given /the response from the service has a Content-Type of '(.*)'/ do |content_type|
@handler.content_type = content_type
end
@@ -31,14 +31,10 @@
Given /that service is protected by Basic Authentication/ do
add_basic_authentication_to @handler
end
-Given /that service is protected by Digest Authentication/ do
- add_digest_authentication_to @handler
-end
-
Given /that service requires the username '(.*)' with the password '(.*)'/ do |username, password|
@handler.username = username
@handler.password = password
end
@@ -51,11 +47,6 @@
# This joins the server thread, and halts cucumber, so you can actually hit the
# server with a browser. Runs until you kill it with Ctrl-c
Given /I want to hit this in a browser/ do
@server.acceptor.join
-end
-
-Then /I wait for the server to recover/ do
- timeout = @request_options[:timeout] || 0
- sleep @server_response_time - timeout
end