# File lib/generators/cucumber/install/install_base.rb, line 108 def create_database(m = self, rails2 = false) unless File.read('config/database.yml').include? 'cucumber:' m.gsub_file 'config/database.yml', /^test:.*\n/, "test: &test\n" m.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