Permalink
Browse files

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: b8d4692
  • Loading branch information...
1 parent 8dba127 commit 3456ef11196406f4ae6908d89ec66d38dc716738 @jonleighton jonleighton committed with jeremy Sep 6, 2011
Showing with 2 additions and 2 deletions.
  1. +2 −2 activerecord/test/cases/fixtures_test.rb
@@ -48,11 +48,11 @@ def test_clean_fixtures
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

0 comments on commit 3456ef1

Please sign in to comment.