# File lib/generators/cucumber/install/install_generator.rb, line 53 def create_database return unless File.exist?('config/database.yml') unless File.read('config/database.yml').include? 'cucumber:' gsub_file 'config/database.yml', /^test:.*\n/, "test: &test\n" gsub_file 'config/database.yml', /\z/, "\ncucumber:\n <<: *test" # Since gsub_file doesn't ask the user, just inform user that the file was overwritten. puts " force config/database.yml" end end