title: JSON::ParserError: 767: unexpected token at 'MyText' (Rails & Minitest)
body: <p>I'm getting some JSON parser errors when I run the tests on my Rails (5.2) app. This is an example:</p>
  <blockquote>
  <p>ERROR[&quot;test_should_show_photo&quot;, Minitest::Result, 5.387737000361085]
  test_should_show_photo#Minitest::Result (5.39s)
  Minitest::UnexpectedError:         ActionView::Template::Error: 767: unexpected token at 'MyText'
  app/views/photos/show.html.erb:2:in &gt;<code>_app_views_photos_show_html_erb___4241643449401419846_70111557791480' test/controllers/photos_controller_test.rb:27:in </code>block in class:PhotosControllerTest'</p>
  </blockquote>
  <p>The error occurs at the lines when the @photo instance variable is called in the code below:</p>
  <pre><code>require 'test_helper'
  
  class PhotosControllerTest &lt; ActionDispatch::IntegrationTest
    setup do
      @photo = photos(:one)
    end
  
    test &quot;should get index&quot; do
      get photos_url
      assert_response :success
    end
  
    test &quot;should get new&quot; do
      get new_photo_url
      assert_response :success
    end
  
    test &quot;should create photo&quot; do
      assert_difference('Photo.count') do
        post photos_url, params: { photo: { image_data: @photo.image_data } }
      end
  
      assert_redirected_to photo_url(Photo.last)
    end
  
    test &quot;should show photo&quot; do
      get photo_url(@photo)
      assert_response :success
    end
  
    test &quot;should get edit&quot; do
      get edit_photo_url(@photo)
      assert_response :success
    end
  
    test &quot;should update photo&quot; do
      patch photo_url(@photo), params: { photo: { image_data: @photo.image_data } }
      assert_redirected_to photo_url(@photo)
    end
  
    test &quot;should destroy photo&quot; do
      assert_difference('Photo.count', -1) do
        delete photo_url(@photo)
      end
  
      assert_redirected_to photos_url
    end
  end
  </code></pre>
  <p><strong>setup</strong> calls the yaml file below:</p>
  <pre><code>one:
    image_data: MyText (This must be where the problem is)
  
  two:
    image_data: MyText
  </code></pre>
  <p>I assume that the issue here is that <strong>MyText</strong> is not JSON syntax, but I can't figure out how to change it so that the tests pass.</p>