Class: TestData::LoadsDatabaseDumps

Inherits:
Object
  • Object
show all
Defined in:
lib/test_data/loads_database_dumps.rb

Instance Method Summary collapse

Constructor Details

#initializeLoadsDatabaseDumps

Returns a new instance of LoadsDatabaseDumps.



6
7
8
# File 'lib/test_data/loads_database_dumps.rb', line 6

def initialize
  @config = TestData.config
end

Instance Method Details

#callObject



10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# File 'lib/test_data/loads_database_dumps.rb', line 10

def call
  load_dump(
    name: "schema",
    database_name: @config.database_name,
    relative_path: @config.schema_dump_path,
    full_path: @config.schema_dump_full_path
  )

  load_dump(
    name: "non-test data",
    database_name: @config.database_name,
    relative_path: @config.non_test_data_dump_path,
    full_path: @config.non_test_data_dump_full_path
  )

  load_dump(
    name: "test data",
    database_name: @config.database_name,
    relative_path: @config.data_dump_path,
    full_path: @config.data_dump_full_path
  )
end