From 098e4d25f19f2b932841401fdc5e7340876d8ff2 Mon Sep 17 00:00:00 2001 From: Roberto Miranda Date: Tue, 2 Apr 2019 15:11:09 +0100 Subject: Add test cases for rake db:prepare --- railties/test/application/rake/dbs_test.rb | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'railties/test/application/rake/dbs_test.rb') diff --git a/railties/test/application/rake/dbs_test.rb b/railties/test/application/rake/dbs_test.rb index a1e237fa7b..ba8de8adc9 100644 --- a/railties/test/application/rake/dbs_test.rb +++ b/railties/test/application/rake/dbs_test.rb @@ -553,6 +553,15 @@ module ApplicationTests end end end + + test "db:prepare setup the database" do + Dir.chdir(app_path) do + rails "generate", "model", "book", "title:string" + output = rails("db:prepare") + + assert_match /CreateBooks: migrated/, output + end + end end end end -- cgit v1.2.3