I use Ruby with Selenium to do test automation on a web application that has a MySQL DB behind it. I need a good way to load data into the DB from a Ruby script. So far in my research I have found using an export of the DB tables in CSV files and then loading the files back into the DB before running a test that requires the data. To connect to the DB I have found the gems mysql2 and net/ssh/gateway.
Does this approach make sense or is there a better way?