diff options
Diffstat (limited to 'activerecord/test')
-rw-r--r-- | activerecord/test/fixtures/funny_jokes.yml | 10 | ||||
-rwxr-xr-x | activerecord/test/fixtures_test.rb | 9 |
2 files changed, 12 insertions, 7 deletions
diff --git a/activerecord/test/fixtures/funny_jokes.yml b/activerecord/test/fixtures/funny_jokes.yml index 834481bc60..d47c4a6a10 100644 --- a/activerecord/test/fixtures/funny_jokes.yml +++ b/activerecord/test/fixtures/funny_jokes.yml @@ -4,11 +4,7 @@ a_joke: another_joke: id: 2 - name: The Aristocrats -a_joke: - id: 1 - name: Knock knock + name: | + The \n Aristocrats + Ate the candy -another_joke: - id: 2 - name: The Aristocrats
\ No newline at end of file diff --git a/activerecord/test/fixtures_test.rb b/activerecord/test/fixtures_test.rb index e33d12e703..2f88feda3f 100755 --- a/activerecord/test/fixtures_test.rb +++ b/activerecord/test/fixtures_test.rb @@ -344,6 +344,15 @@ class InvalidTableNameFixturesTest < Test::Unit::TestCase end end +class CheckEscapedYamlFixturesTest < Test::Unit::TestCase + set_fixture_class :funny_jokes => 'Joke' + fixtures :funny_jokes + + def test_proper_escaped_fixture + assert_equal "The \\n Aristocrats\nAte the candy\n", funny_jokes(:another_joke).name + end +end + class DevelopersProject; end; class ManyToManyFixturesWithClassDefined < Test::Unit::TestCase |