Class: Fixtures

Inherits:
Object show all
Defined in:
lib/nested_scenarios/fixtures.rb

Constant Summary collapse

@@all_cached_fixtures =
{}

Class Method Summary collapse

Class Method Details

.cache_for_connection(connection) ⇒ Object

Overwrite cache for connection to take into account the current fixture path.



6
7
8
9
10
# File 'lib/nested_scenarios/fixtures.rb', line 6

def self.cache_for_connection(connection)
  @@all_cached_fixtures[connection.object_id] ||= {}
  @@all_cached_fixtures[connection.object_id][@@current_fixture_path] ||= {}
  @@all_cached_fixtures[connection.object_id][@@current_fixture_path]
end

.destroy_fixtures(table_names) ⇒ Object



12
13
14
# File 'lib/nested_scenarios/fixtures.rb', line 12

def self.destroy_fixtures(table_names)
  NestedScenarios.delete_tables(table_names)
end