aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2014-02-08 17:11:03 -0800
committerAaron Patterson <aaron.patterson@gmail.com>2014-02-08 17:11:03 -0800
commit3b684dde779af4cb06950bfe788d8fb0852ab936 (patch)
tree3fe46f6fa4d9fa62f3e7a734d8f2b848a2ec6a38
parent1ec25d15d9c2e19df0195165b99335a006d449b6 (diff)
parent28a450d590a03f4b77993b50b24c0abdace460ee (diff)
downloadrails-3b684dde779af4cb06950bfe788d8fb0852ab936.tar.gz
rails-3b684dde779af4cb06950bfe788d8fb0852ab936.tar.bz2
rails-3b684dde779af4cb06950bfe788d8fb0852ab936.zip
Merge pull request #13980 from mellowi/skipping_linked_folder_tests_if_symlink_is_invalid
Skips linked folder tests if symlink is invalid
-rw-r--r--activerecord/test/cases/fixtures_test.rb8
1 files changed, 6 insertions, 2 deletions
diff --git a/activerecord/test/cases/fixtures_test.rb b/activerecord/test/cases/fixtures_test.rb
index f3a4887a85..37c6af74da 100644
--- a/activerecord/test/cases/fixtures_test.rb
+++ b/activerecord/test/cases/fixtures_test.rb
@@ -628,7 +628,9 @@ class LoadAllFixturesTest < ActiveRecord::TestCase
self.class.fixture_path = FIXTURES_ROOT + "/all"
self.class.fixtures :all
- assert_equal %w(admin/accounts admin/users developers people tasks), fixture_table_names.sort
+ if File.symlink? FIXTURES_ROOT + "/all/admin"
+ assert_equal %w(admin/accounts admin/users developers people tasks), fixture_table_names.sort
+ end
ensure
ActiveRecord::FixtureSet.reset_cache
end
@@ -639,7 +641,9 @@ class LoadAllFixturesWithPathnameTest < ActiveRecord::TestCase
self.class.fixture_path = Pathname.new(FIXTURES_ROOT).join('all')
self.class.fixtures :all
- assert_equal %w(admin/accounts admin/users developers people tasks), fixture_table_names.sort
+ if File.symlink? FIXTURES_ROOT + "/all/admin"
+ assert_equal %w(admin/accounts admin/users developers people tasks), fixture_table_names.sort
+ end
ensure
ActiveRecord::FixtureSet.reset_cache
end