aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord
diff options
context:
space:
mode:
authorJon Leighton <j@jonathanleighton.com>2011-09-06 13:45:19 +0100
committerJeremy Kemper <jeremy@bitsweat.net>2011-10-09 16:47:53 -0700
commit3456ef11196406f4ae6908d89ec66d38dc716738 (patch)
treee05fa1126e89b0b160acb06470dec9eadb41e8ed /activerecord
parent8dba1271882cf5d3aecd75ffe2aac6eb63a47867 (diff)
downloadrails-3456ef11196406f4ae6908d89ec66d38dc716738.tar.gz
rails-3456ef11196406f4ae6908d89ec66d38dc716738.tar.bz2
rails-3456ef11196406f4ae6908d89ec66d38dc716738.zip
Use broken YAML that will fail with Syck as well as Psych. Fixes test_broken_yaml_exception in fixtures_test.rb on Ruby 1.8.7.
Cherry-pick from 3-1-stable: b8d46924e70e0847e92e1d2dbaaec8c11381072c
Diffstat (limited to 'activerecord')
-rw-r--r--activerecord/test/cases/fixtures_test.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/activerecord/test/cases/fixtures_test.rb b/activerecord/test/cases/fixtures_test.rb
index 1166c45843..7e2dafcd01 100644
--- a/activerecord/test/cases/fixtures_test.rb
+++ b/activerecord/test/cases/fixtures_test.rb
@@ -48,11 +48,11 @@ class FixturesTest < ActiveRecord::TestCase
def test_broken_yaml_exception
badyaml = Tempfile.new ['foo', '.yml']
- badyaml.write 'a: !ruby.yaml.org,2002:str |\nfoo'
+ badyaml.write 'a: : '
badyaml.flush
dir = File.dirname badyaml.path
- name =File.basename badyaml.path, '.yml'
+ name = File.basename badyaml.path, '.yml'
assert_raises(ActiveRecord::Fixture::FormatError) do
ActiveRecord::Fixtures.create_fixtures(dir, name)
end