views:

20

answers:

0

HI, i have an "Article" model, that has HTML as it's content.

I have created some test data with YAML fixtures and faced following problem:

As i say "rake db:fixtures:load", following error appears:

ArgumentError: syntax error on line 22, col 0: <li>Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</li>

Fixtures fragment, it complains about, is following:

Article_1:
  title: Test Article 1
  content: |
    <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>
    <ul>
       <li>Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</li>
       <li>Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.</li>
    </ul>

It seems, like the HTML code has something, that should not appear in YAML...

What is the proper way to write such a fixtures ?