From ede2343031981e347605d55200e56829c3eb1b20 Mon Sep 17 00:00:00 2001 From: Yves Senn Date: Wed, 13 Jan 2016 10:11:54 +0100 Subject: fix regression when loading fixture files with symbol keys. Closes #22584. --- activerecord/test/cases/fixtures_test.rb | 4 ++++ activerecord/test/fixtures/naked/yml/trees.yml | 3 +++ 2 files changed, 7 insertions(+) create mode 100644 activerecord/test/fixtures/naked/yml/trees.yml (limited to 'activerecord/test') 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 -- cgit v1.2.3