diff options
author | Ryan Davis <ryand-ruby@zenspider.com> | 2013-11-16 00:22:05 -0800 |
---|---|---|
committer | Ryan Davis <ryand-ruby@zenspider.com> | 2013-11-16 00:22:05 -0800 |
commit | 456d308f47ae95dbb59593509dc9348ecaf06368 (patch) | |
tree | ce7386b20df9f79f2304fe9fc26fd5aa55f97de5 | |
parent | 85527917790fc9797aab6359ac010d14c884d307 (diff) | |
download | rails-456d308f47ae95dbb59593509dc9348ecaf06368.tar.gz rails-456d308f47ae95dbb59593509dc9348ecaf06368.tar.bz2 rails-456d308f47ae95dbb59593509dc9348ecaf06368.zip |
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
-rw-r--r-- | activerecord/test/cases/fixtures_test.rb | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/activerecord/test/cases/fixtures_test.rb b/activerecord/test/cases/fixtures_test.rb index bffff07089..f3a4887a85 100644 --- a/activerecord/test/cases/fixtures_test.rb +++ b/activerecord/test/cases/fixtures_test.rb @@ -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 |