mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
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: b8d46924e7
This commit is contained in:
parent
8dba127188
commit
3456ef1119
1 changed files with 2 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue