NameError: undefined local variable or method `json' for #<RSpec::ExampleGroups::Categories::POSTCategory::WhenTheRequestIsValid "creates a category" (./spec/requests/categories_spec.rb:27)> Did you mean? JSON
expect(response).to have_http_status(:success)
expect {
JSON.parse(response.body)
}.to_not raise_error