1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Fix bad test order dependency between LoadAllFixturesTest#test_all_there and FoxyFixturesTest#test_ignores_belongs_to_symbols_if_association_and_foreign_key_are_named_the_same

This commit is contained in:
Ryan Davis 2013-11-16 00:22:05 -08:00
parent 8552791779
commit 456d308f47

View file

@ -624,20 +624,24 @@ class FixturesBrokenRollbackTest < ActiveRecord::TestCase
end
class LoadAllFixturesTest < ActiveRecord::TestCase
self.fixture_path = FIXTURES_ROOT + "/all"
fixtures :all
def test_all_there
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
ensure
ActiveRecord::FixtureSet.reset_cache
end
end
class LoadAllFixturesWithPathnameTest < ActiveRecord::TestCase
self.fixture_path = Pathname.new(FIXTURES_ROOT).join('all')
fixtures :all
def test_all_there
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
ensure
ActiveRecord::FixtureSet.reset_cache
end
end