diff options
author | Yves Senn <yves.senn@gmail.com> | 2016-01-13 10:11:54 +0100 |
---|---|---|
committer | Yves Senn <yves.senn@gmail.com> | 2016-01-13 10:11:54 +0100 |
commit | ede2343031981e347605d55200e56829c3eb1b20 (patch) | |
tree | 68eaefb261e9531599ede90aad73483545f449a5 /activerecord/test | |
parent | ffdeb3a62a9b2fff95c2f5f03b0e31549fb21118 (diff) | |
download | rails-ede2343031981e347605d55200e56829c3eb1b20.tar.gz rails-ede2343031981e347605d55200e56829c3eb1b20.tar.bz2 rails-ede2343031981e347605d55200e56829c3eb1b20.zip |
fix regression when loading fixture files with symbol keys.
Closes #22584.
Diffstat (limited to 'activerecord/test')
-rw-r--r-- | activerecord/test/cases/fixtures_test.rb | 4 | ||||
-rw-r--r-- | activerecord/test/fixtures/naked/yml/trees.yml | 3 |
2 files changed, 7 insertions, 0 deletions
diff --git a/activerecord/test/cases/fixtures_test.rb b/activerecord/test/cases/fixtures_test.rb index c73958900b..da934ab8fe 100644 --- a/activerecord/test/cases/fixtures_test.rb +++ b/activerecord/test/cases/fixtures_test.rb @@ -223,6 +223,10 @@ class FixturesTest < ActiveRecord::TestCase assert_equal(%(table "parrots" has no column named "arrr".), e.message) end + def test_yaml_file_with_symbol_columns + ActiveRecord::FixtureSet.create_fixtures(FIXTURES_ROOT + "/naked/yml", "trees") + end + def test_omap_fixtures assert_nothing_raised do fixtures = ActiveRecord::FixtureSet.new(Account.connection, 'categories', Category, FIXTURES_ROOT + "/categories_ordered") diff --git a/activerecord/test/fixtures/naked/yml/trees.yml b/activerecord/test/fixtures/naked/yml/trees.yml new file mode 100644 index 0000000000..d163b98f21 --- /dev/null +++ b/activerecord/test/fixtures/naked/yml/trees.yml @@ -0,0 +1,3 @@ +root: + :id: 1 + :name: The Root |