Skip to content

Commit

Permalink
Fix dbconsole test when tempdir is a long path
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
sgrif committed Jul 25, 2017
1 parent 902aa87 commit b691a94
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion railties/test/application/dbconsole_test.rb
Expand Up @@ -64,7 +64,7 @@ def test_respect_environment_option
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"
Expand Down

0 comments on commit b691a94

Please sign in to comment.