Answers for "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"

0

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
Posted by: Guest on July-14-2021

Code answers related to "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"

Code answers related to "Javascript"

Browse Popular Code Answers by Language