diff --git a/lib/generators/cucumber/install/install_generator.rb b/lib/generators/cucumber/install/install_generator.rb
index <HASH>..<HASH> 100644
--- a/lib/generators/cucumber/install/install_generator.rb
+++ b/lib/generators/cucumber/install/install_generator.rb
@@ -41,7 +41,7 @@ module Cucumber
       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"
+        gsub_file 'config/database.yml', /\z/, "\ncucumber:\n  <<: *test\n"
 
         # Since gsub_file doesn't ask the user, just inform user that the file was overwritten.
         puts '       force  config/database.yml'
Add new line to end of generated database.yml

Be a good Unix citizen and end with a newline - <URL>