- improved code in test_generator.rb