Class: RealDataTests::LoadStrategies::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/real_data_tests/load_strategies/base.rb

Overview

Base class for dump loading strategies. Subclasses implement #call, which receives the absolute path to the SQL dump file and executes it.

class MyStrategy < RealDataTests::LoadStrategies::Base
def call(dump_path)
  # load the dump
end
end

load_real_test_data("dump", strategy: MyStrategy)

Direct Known Subclasses

Native, Psql

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.call(dump_path) ⇒ Object



16
17
18
# File 'lib/real_data_tests/load_strategies/base.rb', line 16

def self.call(dump_path)
  new.call(dump_path)
end

Instance Method Details

#call(dump_path) ⇒ Object

Raises:

  • (NotImplementedError)


20
21
22
# File 'lib/real_data_tests/load_strategies/base.rb', line 20

def call(dump_path)
  raise NotImplementedError, "#{self.class.name} must implement #call"
end