From 295407026c52216869a98dbed877a09edb801bc6 Mon Sep 17 00:00:00 2001 From: Teddy Wing Date: Sat, 29 Apr 2017 19:24:54 +0200 Subject: Add `DBShell::Sqlite3Client` Much simpler `.build_command` than the Postgres version. Only building arguments now. Want to try out executing the subprocess command. Inspired of course by: https://github.com/django/django/blob/66150f7cf61bc09547fa98586790df596eff6d77/django/db/backends/sqlite3/client.py --- spec/dbshell/sqlite3_client_spec.rb | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 spec/dbshell/sqlite3_client_spec.rb (limited to 'spec') diff --git a/spec/dbshell/sqlite3_client_spec.rb b/spec/dbshell/sqlite3_client_spec.rb new file mode 100644 index 0000000..4922993 --- /dev/null +++ b/spec/dbshell/sqlite3_client_spec.rb @@ -0,0 +1,16 @@ +require 'minitest/autorun' +require 'dbshell/sqlite3_client' + +describe DBShell::Sqlite3Client do + describe ".build_command" do + it "builds basic arguments" do + DBShell::Sqlite3Client.build_command({ + 'adapter' => 'sqlite3', + 'database' => 'db/development.sqlite3' + }).must_equal([ + 'sqlite3', + 'db/development.sqlite3' + ]) + end + end +end -- cgit v1.2.3