Module: FixtureBackground::ActiveSupport::TestCase::InstanceMethods
- Defined in:
- lib/fixture_background/active_support/test_case.rb
Instance Method Summary collapse
Instance Method Details
#reset_active_record_fixture_cache ⇒ Object
37 38 39 40 41 42 |
# File 'lib/fixture_background/active_support/test_case.rb', line 37 def reset_active_record_fixture_cache return if active_record_fixture_cache_resetted Fixtures.class_variable_set(:@@all_cached_fixtures, {}) self.active_record_fixture_cache_resetted = true end |
#setup_background_ivars ⇒ Object
27 28 29 30 31 32 33 34 35 |
# File 'lib/fixture_background/active_support/test_case.rb', line 27 def setup_background_ivars self.background_ivars ||= IVars.deserialize((YAML.load_file("#{fixture_path}/ivars.dump") rescue {})) deep_copy = Marshal.load(Marshal.dump(self.background_ivars)) deep_copy.each do |ivar, record| instance_variable_set(ivar,record) end end |