From b691a946ba229b72f9ec30e50ba5b9ba1e39e6fa Mon Sep 17 00:00:00 2001 From: Sean Griffin Date: Tue, 25 Jul 2017 08:10:52 -0400 Subject: [PATCH] Fix `dbconsole` test when tempdir is a long path The output of `.databases` in SQLite will truncate to a certain size. This causes the test to fail when run locally from a mac, or anything which has a tempdir with more than a few characters. This pragma has the same output, but presented as a normal query, meaning no truncation will occur. --- railties/test/application/dbconsole_test.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/railties/test/application/dbconsole_test.rb b/railties/test/application/dbconsole_test.rb index 12d1cfb089..ab42199db7 100644 --- a/railties/test/application/dbconsole_test.rb +++ b/railties/test/application/dbconsole_test.rb @@ -64,7 +64,7 @@ module ApplicationTests spawn_dbconsole(slave, "-e production") assert_output("sqlite>", master) - master.puts ".databases" + master.puts "pragma database_list;" assert_output("production.sqlite3", master) ensure master.puts ".exit"