spec/support/rails_template.rb in notify_user-0.0.9 vs spec/support/rails_template.rb in notify_user-0.0.10
- old
+ new
@@ -1,7 +1,7 @@
#removes the username and password fields from database.yml
-system("cat #{ENV['RAILS_ROOT']}/config/database.yml | grep -v 'username' > #{ENV['RAILS_ROOT']}/config/database2.yml ")
-system("cat #{ENV['RAILS_ROOT']}/config/database2.yml | grep -v 'password' > #{ENV['RAILS_ROOT']}/config/database.yml ")
+remove_file "#{ENV['RAILS_ROOT']}/config/database.yml"
+copy_file File.expand_path('../../support/database.yml'), "#{ENV['RAILS_ROOT']}/config/database.yml"
rake "db:drop:all"
rake "db:create:all"
generate :model, 'user email:string'
\ No newline at end of file