aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/fixtures_test.rb
diff options
context:
space:
mode:
authorRyan Davis <ryand-ruby@zenspider.com>2013-11-16 00:22:05 -0800
committerRyan Davis <ryand-ruby@zenspider.com>2013-11-16 00:22:05 -0800
commit456d308f47ae95dbb59593509dc9348ecaf06368 (patch)
treece7386b20df9f79f2304fe9fc26fd5aa55f97de5 /activerecord/test/cases/fixtures_test.rb
parent85527917790fc9797aab6359ac010d14c884d307 (diff)
downloadrails-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
Diffstat (limited to 'activerecord/test/cases/fixtures_test.rb')
-rw-r--r--activerecord/test/cases/fixtures_test.rb16
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