How do I convert the following CURL PUT request to rspec and test the behaviour of JSON parser.

```
curl -D - -X PUT --data "not json" -H "Content-Type: application/json" http://localhost:3000

```

And how to check the response? Thank you in advance.