aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/adapters
diff options
context:
space:
mode:
authorMatthew Draper <matthew@trebex.net>2014-04-02 23:06:16 +1030
committerMatthew Draper <matthew@trebex.net>2014-04-03 01:30:27 +1030
commitf846828dae77696daea3bafd91a25a62977be481 (patch)
treefb0deb3d4916990c214ee05d51311386c9ab4250 /activerecord/test/cases/adapters
parentc82483a10abd30310f3360f6ebb6a4dddafdb2ba (diff)
downloadrails-f846828dae77696daea3bafd91a25a62977be481.tar.gz
rails-f846828dae77696daea3bafd91a25a62977be481.tar.bz2
rails-f846828dae77696daea3bafd91a25a62977be481.zip
Revise 'sqlite3:' URL handling for smoother upgrades
Restore the 4.0 behaviour for 'sqlite3:///', but deprecate it. We'll change to the absolute-path interpretation in 4.2. The current "correct" spellings for in-memory, relative, and absolute URLs, respectively, are: sqlite3::memory: sqlite3:relative/path sqlite3:/full/path Substantially reverses/defers fbb79b517f3127ba620fedd01849f9628b78d6ce. Uncovered by @guilleiguaran while investigating #14495, though that sounds like a different issue.
Diffstat (limited to 'activerecord/test/cases/adapters')
-rw-r--r--activerecord/test/cases/adapters/sqlite3/sqlite3_adapter_test.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/activerecord/test/cases/adapters/sqlite3/sqlite3_adapter_test.rb b/activerecord/test/cases/adapters/sqlite3/sqlite3_adapter_test.rb
index c2a255451e..14aad61ce2 100644
--- a/activerecord/test/cases/adapters/sqlite3/sqlite3_adapter_test.rb
+++ b/activerecord/test/cases/adapters/sqlite3/sqlite3_adapter_test.rb
@@ -31,7 +31,7 @@ module ActiveRecord
def test_connect_with_url
original_connection = ActiveRecord::Base.remove_connection
tf = Tempfile.open 'whatever'
- url = "sqlite3://#{tf.path}"
+ url = "sqlite3:#{tf.path}"
ActiveRecord::Base.establish_connection(url)
assert ActiveRecord::Base.connection
ensure
@@ -42,7 +42,7 @@ module ActiveRecord
def test_connect_memory_with_url
original_connection = ActiveRecord::Base.remove_connection
- url = "sqlite3:///:memory:"
+ url = "sqlite3::memory:"
ActiveRecord::Base.establish_connection(url)
assert ActiveRecord::Base.connection
ensure