lib/lookout/rack/test/cucumber/general_steps.rb in lookout-rack-test-1.0.1 vs lib/lookout/rack/test/cucumber/general_steps.rb in lookout-rack-test-1.1.0
- old
+ new
@@ -1,21 +1,21 @@
When /^I (GET|PUT|POST|DELETE)( to)? "(.*?)"$/ do |verb, unused, url_path|
verb = verb.downcase.to_sym
send(verb, render_string(url_path))
end
-When /^I (GET|POST|PUT)( to)? "([^"]*)" with:$/ do |verb, unused, url, params|
+When /^I (GET|PUT|POST|DELETE)( to)? "([^"]*)" with:$/ do |verb, unused, url, params|
options = {}
params.hashes.each do |row|
options[row[:Name]] = render_string(row[:Value])
end
verb = verb.downcase.to_sym
send(verb, render_string(url), options)
end
-When /^I (DELETE|POST) to "(.*?)" with the JSON:$/ do |verb, url, body|
+When /^I (GET|PUT|POST|DELETE) to "(.*?)" with the JSON:$/ do |verb, url, body|
verb = verb.downcase.to_sym
send(verb, render_string(url), render_string(body))
end
Then /^the response (should be|is) (\d+)$/ do |verb, code|