title: RSpec - Type error - no implicit conversion of String into Integer
body: <p>I'm trying to make a test green and I'm getting this error. Even when I pry the code it shows that a string is being returned so I have no idea why the test won't green. Here is my test and error for clarification. I'm assuming this is a common error for folks.</p>
  
  <p>Here is my test - </p>
  
  <pre><code>require "rails_helper"
  
  RSpec.describe "/api/retailers" do
  
  describe "GET /api/retailers" do
  it "Returns JSON for retailers" do
  
    location = Location.create!(
      city: "Portland",
      street_1: "Cherry",
      state: "Oregon",
      zip: "49490"
    )
  
    retailer = Retailer.create!(
      name: "Good Coffee Co.",
      description: "Hipster Good",
      image_url: "http://www.example.com/foo_bar.jpg",
      location: location
    )
  
    get "/api/retailers.json"
  
    expect(response).to be_success
    json = JSON.parse(response.body)
  
    expect(json["name"]).to eql("Good Coffee Co.")
    expect(json["description"]).to eql("Hipster Good")
    expect(json["image_url"]).to eql("http://www.example.com/foo_bar.jpg")
    expect(json["location"]).to eql(location.city)
  end
  end
  end
  </code></pre>
  
  <p>here is my error message - </p>
  
  <pre><code>/api/retailers GET /api/retailers Returns JSON for retailers
   Failure/Error: expect(json["name"]).to eql("Good Coffee Co.")
  
   TypeError:
     no implicit conversion of String into Integer
   # ./spec/requests/retailers_spec.rb:28:in `[]'
   # ./spec/requests/retailers_spec.rb:28:in `block (3 levels) in &lt;top (required)&gt;'
  </code></pre>