Permalink
Browse files

lazy-initialize already loaded fixtures map

  • Loading branch information...
1 parent d87d3f7 commit 1df0a07f060291397dcbc8dd39e3abd3ad915a78 @jeremy jeremy committed Nov 9, 2008
Showing with 1 addition and 1 deletion.
  1. +1 −1 activerecord/lib/active_record/fixtures.rb
View
2 activerecord/lib/active_record/fixtures.rb
@@ -832,7 +832,6 @@ def self.included(base)
self.use_instantiated_fixtures = true
self.pre_loaded_fixtures = false
- @@already_loaded_fixtures = {}
self.fixture_class_names = {}
end
@@ -940,6 +939,7 @@ def setup_fixtures
# Load fixtures for every test.
else
Fixtures.reset_cache
+ @@already_loaded_fixtures ||= {}
@@already_loaded_fixtures[self.class] = nil
load_fixtures
end

0 comments on commit 1df0a07

Please sign in to comment.