Activestorage fixtures attachments : <p>In rails tests. I have a basic model with only activestorage:</p>

<pre><code>class User &lt; ApplicationRecord
  has_one_attached :avatar
end
</code></pre>

<p>I'm trying to make it's fixture, but having no luck with (I do have an image there):</p>

<pre><code># users.yml
one:
  avatar: &lt;%= File.open Rails.root.join('test', 'files', 'image.png').to_s %&gt;
</code></pre>

<p>How do I properly attach an avatar file through fixtures?</p>
