module JSONRequestHelper
  def put_json(path, attrs, headers = {})
    put path, attrs.to_json, {"Content-Type" => "application/json"}.merge(headers)
  end
end

RSpec.configuration.include JSONRequestHelper, :type => :request

module JSONRequestHelper
  def put_json(path, attrs, headers = {})
    put path, attrs.to_json, {"CONTENT_TYPE" => "application/json"}.merge(headers)
  end
end

RSpec.configuration.include JSONRequestHelper, :type => :request

Fix put_json test helper to work with Rails 3.
Fix put_json test helper to work with Rails 3.

Rails 3 integration stuff has some special handling for content-type,
but this is done before the case etc. is normalised, so if this doesn't
match the case that Rails uses internally, oddness ensues.
