diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2006-08-24 01:50:24 +0000 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2006-08-24 01:50:24 +0000 |
commit | 842ce34bbcfb2d65b04a6e80bf8c168d7c17277d (patch) | |
tree | b675a3ffe4a8e080888b4c7bf5c497b6760bf892 /activerecord/test/fixtures_test.rb | |
parent | d37604f03ee9af7cf2d65ec2e1be986342a965c5 (diff) | |
download | rails-842ce34bbcfb2d65b04a6e80bf8c168d7c17277d.tar.gz rails-842ce34bbcfb2d65b04a6e80bf8c168d7c17277d.tar.bz2 rails-842ce34bbcfb2d65b04a6e80bf8c168d7c17277d.zip |
Fixtures: correct escaping of \n and \r. Closes #5859.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4811 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activerecord/test/fixtures_test.rb')
-rwxr-xr-x | activerecord/test/fixtures_test.rb | 9 |
1 files changed, 9 insertions, 0 deletions
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 |