```ruby
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.
user
```ruby
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
```
assistant