class BeetleETL::Testing::TestWrapper
Public Instance Methods
run(block)
click to toggle source
# File lib/beetle_etl/testing/test_wrapper.rb, line 5 def run(block) begin create_stages block.call ensure drop_stages end end
Private Instance Methods
create_stages()
click to toggle source
# File lib/beetle_etl/testing/test_wrapper.rb, line 16 def create_stages transformations.each do |t| CreateStage.new(config, t.table_name, t.relations, t.column_names).run end end
drop_stages()
click to toggle source
# File lib/beetle_etl/testing/test_wrapper.rb, line 22 def drop_stages transformations.each do |t| DropStage.new(config, t.table_name).run end end
transformations()
click to toggle source
# File lib/beetle_etl/testing/test_wrapper.rb, line 28 def transformations @transformations ||= TransformationLoader.new(config).load.find_all do |transformation| table_names.include? transformation.table_name end end