提交 456d308f 编写于 作者: R Ryan Davis

Fix bad test order dependency between LoadAllFixturesTest#test_all_there and...

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
上级 85527917
......@@ -624,20 +624,24 @@ def load_fixtures(config)
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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册