lib/capybara/rack_test_json/client.rb in capybara-json-0.2.1 vs lib/capybara/rack_test_json/client.rb in capybara-json-0.2.2
- old
+ new
@@ -11,10 +11,10 @@
end
%w[ get post put delete ].each do |method|
module_eval %{
def #{method}(uri, params = {}, env = {}, &block)
- env.merge(:method => "#{method.upcase}", :params => params)
+ env = env.merge(:method => "#{method.upcase}", :params => params)
if options[:follow_redirect]
request_with_follow_redirect(uri, env, &block)
else
request(uri, env)
end