Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
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...
commit 3456ef11196406f4ae6908d89ec66d38dc716738 1 parent 8dba127
Jon Leighton jonleighton authored jeremy committed
Showing with 2 additions and 2 deletions.
  1. +2 −2 activerecord/test/cases/fixtures_test.rb
4 activerecord/test/cases/fixtures_test.rb
View
@@ -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
Please sign in to comment.
Something went wrong with that request. Please try again.