Ruby script for automated testing