From 4700d0279ccbf8571b8c90b9bedb69b4f0ecf1b1 Mon Sep 17 00:00:00 2001 From: Kassio Borges Date: Mon, 5 Aug 2013 16:35:49 -0300 Subject: load fixtures from linked folders --- activerecord/test/cases/fixtures_test.rb | 4 ++-- activerecord/test/fixtures/all/admin | 1 + activerecord/test/fixtures/to_be_linked/accounts.yml | 2 ++ activerecord/test/fixtures/to_be_linked/users.yml | 10 ++++++++++ 4 files changed, 15 insertions(+), 2 deletions(-) create mode 120000 activerecord/test/fixtures/all/admin create mode 100644 activerecord/test/fixtures/to_be_linked/accounts.yml create mode 100644 activerecord/test/fixtures/to_be_linked/users.yml (limited to 'activerecord/test') diff --git a/activerecord/test/cases/fixtures_test.rb b/activerecord/test/cases/fixtures_test.rb index 2aa56ebc55..c07c9c3b74 100644 --- a/activerecord/test/cases/fixtures_test.rb +++ b/activerecord/test/cases/fixtures_test.rb @@ -584,7 +584,7 @@ class LoadAllFixturesTest < ActiveRecord::TestCase fixtures :all def test_all_there - assert_equal %w(developers people tasks), fixture_table_names.sort + assert_equal %w(admin/accounts admin/users developers people tasks), fixture_table_names.sort end end @@ -593,7 +593,7 @@ class LoadAllFixturesWithPathnameTest < ActiveRecord::TestCase fixtures :all def test_all_there - assert_equal %w(developers people tasks), fixture_table_names.sort + assert_equal %w(admin/accounts admin/users developers people tasks), fixture_table_names.sort end end diff --git a/activerecord/test/fixtures/all/admin b/activerecord/test/fixtures/all/admin new file mode 120000 index 0000000000..984d12a043 --- /dev/null +++ b/activerecord/test/fixtures/all/admin @@ -0,0 +1 @@ +../to_be_linked/ \ No newline at end of file diff --git a/activerecord/test/fixtures/to_be_linked/accounts.yml b/activerecord/test/fixtures/to_be_linked/accounts.yml new file mode 100644 index 0000000000..9e341a15af --- /dev/null +++ b/activerecord/test/fixtures/to_be_linked/accounts.yml @@ -0,0 +1,2 @@ +signals37: + name: 37signals diff --git a/activerecord/test/fixtures/to_be_linked/users.yml b/activerecord/test/fixtures/to_be_linked/users.yml new file mode 100644 index 0000000000..e2884beda5 --- /dev/null +++ b/activerecord/test/fixtures/to_be_linked/users.yml @@ -0,0 +1,10 @@ +david: + name: David + account: signals37 + +jamis: + name: Jamis + account: signals37 + settings: + :symbol: symbol + string: string -- cgit v1.2.3